Also, I tried taking out the loop in question in comment 14 out, and it indeed fixes the perf problem.
Also, I tried taking out the loop in question in comment 14 out, and it indeed fixes the perf problem.