-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a package is slow #4175
Comments
Hi @tfausak; no, it is a bug that Cabal is slow :) I assume by cold/warm cache you mean, whether or not you have configured previously? I'm not going to ask you to submit patches to fix the performance, but if you're interested in drilling down and finding out exactly what it is that is taking up this time, that would be very helpful information. |
I should have been more specific about cold/warm caches. By "cold cache" I mean building the package in a fresh sandbox. The benchmark ran I did run a build with |
flamegraphs are easy to build:
I looked around at one and didn't see anything obviously taking up way too much time. But, perhaps of note, 35% of the time is spent just getting to |
#4093 suggests this might be happening at the GHC level rather than the Cabal level. |
I recently discovered that building packages is surprisingly more costly than building modules. See commercialhaskell/stack#2831 for a benchmark and results. The takeaway is this:
I chased that behavior down to
cabal configure
andcabal build
, so the problem isn't really with Stack. That made me wonder about how long it takes to build a package with Cabal, so I wrote a benchmark for that. Here are the raw results:What I take away from that is this: Building an empty package with a cold cache takes 1.4 seconds on my machine. A warm cache brings that down to 0.5 seconds. Both of those seem high, but especially the former. Are these results expected?
The text was updated successfully, but these errors were encountered: