This change halves execution time on my machine. hg-commit-id: aa8e5c92d38c
Depending on how well this works, it may be removed later. Hopefully not. hg-commit-id: d244e025471f