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
#24 and #23 fix most of the slowness in cabal buck2 itself. As far as I can tell, most of the rest is upstream cabal planning.
It seems like haskell/cabal#12463 is a significant source of memory usage in cabal (and hence slowness). I tested building with haskell/cabal#12500 and that removes almost all the remaining memory bloat.
With all of these together, runtime on my project goes from 90s to 10s. Can we do better? not sure.
Ah hmm, I've been mixing things up. Obviously it highly depends on whether cabal reuses its plan cache or not. haskell/cabal#12500 helps greatly with the case where it does use the cache, which is important for re-running cabal buck2. The other two help when cabal re-plans. Which is still pretty slow.
Ideally cabal buck2 would do enough caching that it's virtually instant if nothing has changed, but I think this is mostly Cabal's problem rather than ours.
Yup, this is with -j. If cabal's plan is cached, it is indeed pretty fast so long as I include those upstream PRs that reduce the cache size. So that's probably fine. But we were also doing some things that made us unnecessarily slow when we have a new plan, so I do think fixing those is worthwhile. For the new user impression if nothing else!
Activity
michaelpj commentedon Nov 7, 2026
#27 takes another 4s off.
michaelpj commentedon Nov 8, 2026
Ah hmm, I've been mixing things up. Obviously it highly depends on whether cabal reuses its plan cache or not. haskell/cabal#12500 helps greatly with the case where it does use the cache, which is important for re-running
cabal buck2. The other two help when cabal re-plans. Which is still pretty slow.simonmar commentedon Nov 10, 2026
Did you use
-jby the way?Ideally
cabal buck2would do enough caching that it's virtually instant if nothing has changed, but I think this is mostly Cabal's problem rather than ours.michaelpj commentedon Nov 10, 2026
Yup, this is with
-j. If cabal's plan is cached, it is indeed pretty fast so long as I include those upstream PRs that reduce the cache size. So that's probably fine. But we were also doing some things that made us unnecessarily slow when we have a new plan, so I do think fixing those is worthwhile. For the new user impression if nothing else!