Skip to content

Speedup opam update when nothing changed#6283

Draft
kit-ty-kate wants to merge 6 commits intoocaml:masterfrom
kit-ty-kate:last-modified
Draft

Speedup opam update when nothing changed#6283
kit-ty-kate wants to merge 6 commits intoocaml:masterfrom
kit-ty-kate:last-modified

Conversation

@kit-ty-kate
Copy link
Copy Markdown
Member

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

Fixes #5553
Queued on #6327

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

@kit-ty-kate kit-ty-kate added AREA: ENGINE PR: WIP Not for merge at this stage labels Oct 31, 2024
@kit-ty-kate kit-ty-kate added this to the 2.4.0~alpha1 milestone Oct 31, 2024
@kit-ty-kate kit-ty-kate added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Jan 21, 2025
@rjbou rjbou mentioned this pull request Feb 20, 2025
7 tasks
@kit-ty-kate kit-ty-kate modified the milestones: 2.4.0~alpha1, 2.5.0~alpha1 Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AREA: ENGINE AREA: PERFORMANCE PR: QUEUED Pending pull request, waiting for other work to be merged or closed 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

2 participants