Recipe for fixing a space leak:

1. verify that leak exists with heap profiling
2. comment stuff out and/or add strictness until the leak goes away
3. uncomment stuff again, slowly, until the leak reappears
4. fix leak
5. go back to 3 until everything is uncommented again. The leak might need fixing in several places.

(I've been doing this in GHC today, I am currently in the 3-5 loop, getting as far as 3 took several hours).

We must be able to do better than this. It's a shame that retainer profiling doesn't do what it ought to do - one day I'm going to build a better tool to solve this problem.
Shared publiclyView activity