git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Index/hash order

From
BEBaruch Even <baruch@ev-en.org>
Date
Apr 13, 2005, 20:28 UTC
Message-ID
<425D8104.9030109@ev-en.org>
In-Reply-To
<20050413182909.GA25221@elte.hu>
Ingo Molnar wrote:
Show 14 quoted lines
> with a plaintext repository we could do the 'hardlink trick' (which 
> brings in other manageability problems and limitations but is at least a 
> partially good idea), which would make the working tree and the 
> repository share the same inode in most cases.
> 
> While in the compressed case we'd have a separate compressed inode 
> (taking up RAM with all its contents) and the working directory inode 
> (taking up RAM) - summing up to more RAM than if we only had a single 
> inode per object.
> 
> furthermore, when generating/destroying large trees (which is a quite 
> common thing), a hardlinked solution is faster, as it doesnt create 
> 250MB+ of dirty RAM. In some cases (e.g. handling dozens of 'merge 
> trees') it's dramatically faster.

You could still have the hardlink way by way of a .git/cache that keeps uncompressed files, keep the files with their hash names but uncompressed.

It will be easy to find, fully hard-linkable, only keep the needed files 
  uncompressed and the three year old file compressed. The

You can even save some CPU time by checking if the file is in the cache before decompressing it, though it does cost you with an extra disk access to see if it's there or not. If you repeat the operation enough you'll have the uncompressed version in the cache most of the times anyway.

Clear the cache weekly or so to avoid stale files from an ancient version.
Baruch
Previous: Linus TorvaldsNext: Florian Weimer
Message 15 of 20 in “Re: Index/hash order”
  1. Ingo MolnarApr 13, 2005
  2. H. Peter AnvinApr 13, 2005
  3. Ingo MolnarApr 13, 2005
  4. Ingo MolnarApr 13, 2005
  5. Ingo MolnarApr 13, 2005
  6. Updated base64 patchesH. Peter Anvin, Apr 13, 2005
  7. Linus TorvaldsApr 13, 2005
  8. enforcing DB immutabilityIngo Molnar, Apr 20, 2005
  9. Ingo MolnarApr 20, 2005
  10. Ingo MolnarApr 20, 2005
  11. Chris WedgwoodApr 20, 2005
  12. Nick Craig-WoodApr 20, 2005
  13. WoutApr 27, 2005
  14. Linus TorvaldsApr 13, 2005
  15. Baruch EvenApr 13, 2005
  16. Florian WeimerApr 13, 2005
  17. Linus TorvaldsApr 13, 2005
  18. Florian WeimerApr 13, 2005
  19. Ingo MolnarApr 14, 2005
  20. cache-cold repository performanceIngo Molnar, Apr 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.