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

Re: Mozilla, git and Windows

From
Jon Smirl <jonsmirl@gmail.com>
Date
Nov 28, 2006, 01:35 UTC
Message-ID
<9e4733910611271735y14bed29bk70ae67b5d28eb055@mail.gmail.com>
In-Reply-To
<20061127221338.GP7201@pasky.or.cz>
On 11/27/06, Petr Baudis <pasky@suse.cz> wrote:
Show 7 quoted lines
> On Mon, Nov 27, 2006 at 05:13:10PM CET, Jon Smirl wrote:
> > The SVN version of the Mozilla repository is about 3GB. It takes
> > around a week of CPU time for svnimport to process it.
>
> Is there a reason why a SVN importer would _have_ to take _longer_ than
> a CVS importer? I'd expect the opposite from an optimized importer since
> you don't have to guess the changesets...

These import programs take forever because they fork off git, SVN or CVS millions of times. It really does take a week to fork a CVS process that many times. It's not the application code that is taking a week to run, it is the millions of forks.

As was mentioned in the thread about doing CVS to git import, the trick is to write your own CVS file parser, parse the file once (not once for each revision) and output all of the revisions to the git database in a single pass. When code is structured that way I can import the whole Mozilla repository into git in two hours. The fast-import back end also works with out forking, it just listens to command and stdin and acts on them, all of the commands are implement in a single binary.

The speed of fork in Linux is fine for most purposes, but it is not fine if you are going to fork off good sized apps several million times. When I measured those forks in oprofile, 60% of the CPU was being consumed by the kernel.

-- 
Jon Smirl
Previous: Petr BaudisNext: Michael Haggerty
Message 6 of 8 in “Mozilla, git and Windows”
  1. Jon SmirlNov 27, 2006
  2. Andy WhitcroftNov 27, 2006
  3. Jon SmirlNov 27, 2006
  4. Robin RosenbergNov 27, 2006
  5. Petr BaudisNov 27, 2006
  6. Jon SmirlNov 28, 2006
  7. Michael HaggertyNov 28, 2006
  8. Sam VilainNov 28, 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.