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

opam update completely reloads the repository #5824

Open
dra27 opened this issue Feb 6, 2024 · 2 comments
Open

opam update completely reloads the repository #5824

dra27 opened this issue Feb 6, 2024 · 2 comments

Comments

@dra27
Copy link
Member

dra27 commented Feb 6, 2024

This is most noticeable on Windows, where the file system I/O between opam / OCaml is effectively slower, but the problem can be seen in less-cached environments - e.g. in a Docker container on Linux.

For a git remote, opam is able to short-circuit reloading the entire repository when it detects that there are no changes (this is a good reason for using git remotes, as it's a faster check than for the https remote). However, if there are any changes, the entire repository is reloaded.

It seems we could be fairly easily doing something a little better, and possibly also for the https remote on update. The update is actually applied by means of a patch (even for git remotes), which means that opam always knows exactly which files have changed.

Related to @kit-ty-kate's work on #5741 (and also #5648).

@rjbou rjbou added this to To keep on hand in Opam 2.2.0 Feb 12, 2024
@kit-ty-kate kit-ty-kate moved this from To keep on hand to For RC in Opam 2.2.0 Feb 12, 2024
@kit-ty-kate
Copy link
Member

Could be done using the diff implementation in #5892

@kit-ty-kate
Copy link
Member

I had a look at this again and it would require #5892 (and also use this diff implementations for VCSs) or someone needs to go on a deep dive and find a way to fix hannesm/patch#17 that matches every implementations of diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Opam 2.2.0
  
To keep on hand
Development

No branches or pull requests

2 participants