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

Re: Repacking many disconnected blobs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 14, 2006, 09:07 UTC
Message-ID
<Pine.LNX.4.63.0606141104050.15578@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<20060614072923.GB13886@spearce.org>
Hi,
On Wed, 14 Jun 2006, Shawn Pearce wrote:
Show 25 quoted lines
> Keith Packard <keithp@keithp.com> wrote:
> > parsecvs scans every ,v file and creates a blob for every revision of
> > every file right up front. Once these are created, it discards the
> > actual file contents and deals solely with the hash values.
> > 
> > The problem is that while this is going on, the repository consists
> > solely of disconnected objects, and I can't make git-repack put those
> > into pack objects. This leaves the directories bloated, and operations
> > within the tree quite sluggish. I'm importing a project with 30000 files
> > and 30000 revisions (the CVS repository is about 700MB), and after
> > scanning the files, and constructing (in memory) a complete revision
> > history, the actual construction of the commits is happening at about 2
> > per second, and about 70% of that time is in the kernel, presumably
> > playing around in the repository.
> > 
> > I'm assuming that if I could get these disconnected blobs all neatly
> > tucked into a pack object, things might go a bit faster.
> 
> What about running git-update-index using .git/objects as the
> current working directory and adding all files in ??/* into the
> index, then git-write-tree that index and git-commit-tree the tree.
> 
> When you are done you have a bunch of orphan trees and a commit
> but these shouldn't be very big and I'd guess would prune out with
> a repack if you don't hold a ref to the orphan commit.
Alternatively, you could construct fake trees like this:

README/1.1.1.1 README/1.2 README/1.3 ...

i.e. every file becomes a directory -- containing all the versions of that file -- in the (virtual) tree, which you can point to by a temporary ref.

Ciao, Dscho

Previous: Shawn PearceNext: Junio C Hamano
Message 3 of 15 in “Repacking many disconnected blobs”
  1. Keith PackardJun 14, 2006
  2. Shawn PearceJun 14, 2006
  3. Johannes SchindelinJun 14, 2006
  4. Junio C HamanoJun 14, 2006
  5. Sergey VlasovJun 14, 2006
  6. Linus TorvaldsJun 14, 2006
  7. Keith PackardJun 14, 2006
  8. Linus TorvaldsJun 14, 2006
  9. Linus TorvaldsJun 14, 2006
  10. Keith PackardJun 14, 2006
  11. Linus TorvaldsJun 14, 2006
  12. Nicolas PitreJun 14, 2006
  13. Keith PackardJun 14, 2006
  14. Linus TorvaldsJun 14, 2006
  15. Nicolas PitreJun 14, 2006

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.