Skip to content
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

Cache transitive dependencies #409

Closed
felixSchl opened this issue Sep 16, 2019 · 3 comments · Fixed by #412
Closed

Cache transitive dependencies #409

felixSchl opened this issue Sep 16, 2019 · 3 comments · Fixed by #412

Comments

@felixSchl
Copy link

The call to getTransitiveDeps can get quite slow for larger projects, even on a decent machine.

I found at least one relevant reference to this here: #110 (comment).

I am wondering if we could not simply cache the transitive deps based on the hash of the dhall files, perhaps, or even take the hash of the PackageSet type, if at all possible.

@f-f
Copy link
Member

f-f commented Sep 16, 2019

@felixSchl yeah, great points! I think it would be ok to cache things based on the hash of Dhall files, but it might not be necessary if we had a faster implementation. I think the current implementation is fairly naive and there might be lots of space for improvement, as noted in the comment you linked

@justinwoo
Copy link
Contributor

my other question for this is would this work with a function written in dhall?

@f-f
Copy link
Member

f-f commented Sep 16, 2019

@justinwoo as I understood it they did not mean to write the function in Dhall, but to use the hash of spago.dhall or packages.dhall to identify the right cache to use for caching the list of transitive dependencies for every package

@Dretch Dretch self-assigned this Sep 19, 2019
Dretch added a commit that referenced this issue Sep 19, 2019
This reduces the time needed for a no-op `spago install` on acme-spago
from 3.7s to 0.1s (on my machine)
@Dretch Dretch mentioned this issue Sep 19, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants