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

Speedup opam update when nothing changed #6283

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kit-ty-kate
Copy link
Member

@kit-ty-kate kit-ty-kate commented Oct 31, 2024

Fixes #5553

The code in its current form is very crude and in no way ready to be merged.
This PR achieves a 8x speedup compared to 2.3.0~rc1 on subsequent empty updates after initialization of the new values, going from 3.5s to an almost instantaneous 0.4s.

TODO:

  • make etag and last_modified their own record to avoid having to carry both around
  • write the repos-config file when there is no diff but etag&last_modified differ
  • bump the opam_version of repos-config to 2.4 (new syntax is not ignored by previous versions of opam)
  • add some dedicated tests
  • make sure the cache is invalidated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: ENGINE PR: WIP Not for merge at this stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opam update that are noop should be instantaneous
1 participant