You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix 3 space leaks and refactoring of PositionMapping (#557)
* Rats: Fix space leak in withProgress
Eta-expanding the function means GHC no longer allocates a function
closure every time `withProgress` is called (which is a lot).
See: https://www.joachim-breitner.de/blog/763-Faster_Winter_5__Eta-Expanding_ReaderT
* Rats: Share computation of position mapping
Ensure that PositionMappings are shared between versions
There was a quadratic space leak as the tails of the position maps were
not shared with each other. Now the space usage is linear which is
produces more acceptable levels of residency after 3000 modifications.
* Rats: Eta-expand modification function
See: https://www.joachim-breitner.de/blog/763-Faster_Winter_5__Eta-Expanding_ReaderT
* Add a comment warning about eta-reducing
* Distinguish between a Delta and a Mapping in PositionMapping
A Delta is a change between two versions
A Mapping is a change from the current version to a specific older
version.
Fix hlint
Fix hlint
0 commit comments