uv icon indicating copy to clipboard operation
uv copied to clipboard

Question about space efficiency of the git cache

Open sbidoul opened this issue 1 year ago • 2 comments

If I understand correctly, installing from git URL creates the following in the uv cache:

  1. the git objects in git-v0/db
  2. a git checkout in git-v0/checkouts (with hardlinks to the git objects but copies of the source files)
  3. the built wheel in wheels-v0
  4. an extract of the built wheel archive-v0, from which the installed files are hard linked (or CoW'ed)

My question is: is it important to keep (2) when we have (3), and maybe (3) when we have (4)? Are there situations where checkouts (2) are actually read again in subsequent installs?

sbidoul avatar Feb 20 '24 15:02 sbidoul

I'm the right person to answer this but I need to think a bit on some of the questions (and am trying to prioritize correctness issues). My initial reaction is that (3) is probably not necessary (but we tend to avoid trying to delete from the cache to prevent against concurrency issues).

charliermarsh avatar Feb 20 '24 15:02 charliermarsh

My initial reaction is that (3) is probably not necessary

In connection with pip wheel (#1681), I think (3) is useful, probably more than (2).

sbidoul avatar Feb 21 '24 17:02 sbidoul