-
Notifications
You must be signed in to change notification settings - Fork 132
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
Super slow lockfile parsing #1262
Comments
This may be a me problem and not something that's going to impact the average user... Our lockfile is made up of 120k lines of @f-f I know very little about the internals so this might be a stupid question, but are the build plans necessary or could they be worked out at runtime by looking up the transient deps and nubbing the results? Here's one example from our lockfile:
|
The reason why we have a lockfile is to enable reprodicible and offline builds in a self-contained manner - we need a certain amount of information to be able to have them work both in Spago and in other tools such as Nix (where one can just read the lockfile and not have to invoke spago at all) without hitting the internet or some other local cache. We might be able to get away with less info, but the current structure stems from how the code is structured to come up with a build plan with a package set or with the solver, and with and without the lockfile. May be worth trying to have a look to see if we can have less info, but the Nix case needs to be taken into account (cc @thomashoneyman)
It's a general problem. I have also noticed how slow the yaml parsing is. A few ideas about that:
|
We could definitely get away with a more compressed lockfile format. My primary considerations from the Nix side:
We might not want to take too much information out of the lockfile because then Spago has to compute it at runtime. But at a glance it seems we're on the wrong side of the trade right now. |
@finnhodgkin now that #1261 is merged I pivoted this issue to track slow parsing of the lockfiles. |
I had a look at the code that uses the lockfile, and I think we can let go of having a It should not be too hard to patch either - sketch:
@finnhodgkin I won't manage to get to this for a while, so feel free to give it a spin if you'd like |
At my work we have a very large workspace with many libs.
Adding or removing any modules from any of the libs takes more than three minutes. I've narrowed most of this time down to lockfile generation.
Adding a bunch of extra caching and combining queries gets that time down to <1.5s.
The text was updated successfully, but these errors were encountered: