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

Re: inotify daemon speedup for git [POC/HACK]

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 28, 2010, 13:06 UTC
Message-ID
<m3tynjkb90.fsf@localhost.localdomain>
In-Reply-To
<20100728000009.GE25268@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 23 quoted lines
> Avery Pennarun <apenwarr@gmail.com> wrote:
> > 
> > While we're here, it's probably worth mentioning that git's index file
> > format (which stores a sequential list of full paths in alphabetical
> > order, instead of an actual hierarchy) does become a bottleneck when
> > you actually have a huge number of files in your repo (like literally
> > a million).  You can't actually binary search through the index!  The
> > current implementation of submodules allows you to dodge that
> > scalability problem since you end up with multiple smaller index
> > files.  Anyway, that's fixable too.
> 
> Yes.
> 
> More than once I've been tempted to rewrite the on-disk (and I guess
> in-memory) format of the index.  And then I remember how painful that
> stuff is in either C git.git or JGit, and I back away slowly.  :-)
> 
> Ideally the index is organized the same way the trees are, but
> you still can't do a really good binary search because of the
> ass-backwards name sorting rule for trees.  But for performance
> reasons you still want to keep the entire index in a single file,
> an index per directory (aka SVN/CVS) is too slow for the common
> case of <30k files.

I guess that modern filesystems solve the problem of very many files in a single directory somehow (hash tables?). Perhaps the index file could borrow some such mechanism as an extension.

Index for index?
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jakub NarebskiNext: Enrico Weigelt
Message 16 of 18 in “inotify daemon speedup for git [POC/HACK]”
  1. Finn Arne GangstadJul 27, 2010
  2. Avery PennarunJul 27, 2010
  3. Joshua JuranJul 27, 2010
  4. Avery PennarunJul 27, 2010
  5. Shawn O. PearceJul 28, 2010
  6. Avery PennarunJul 28, 2010
  7. Joshua JuranJul 28, 2010
  8. Avery PennarunJul 28, 2010
  9. Sverre RabbelierJul 28, 2010
  10. Jonathan NiederJul 28, 2010
  11. Ævar Arnfjörð BjarmasonJul 28, 2010
  12. Theodore TsoJul 28, 2010
  13. Nguyen Thai Ngoc DuyJul 28, 2010
  14. Enrico WeigeltAug 13, 2010
  15. Jakub NarebskiJul 28, 2010
  16. Jakub NarebskiJul 28, 2010
  17. Enrico WeigeltAug 13, 2010
  18. Sverre RabbelierJul 27, 2010

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.