This issue will be quickly solved by removing the process that stores fully formed permutations in an array.