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

Re: [PATCH 0/9] Make git-svn fetch ~1.7x faster

From
Sam Vilain <sam@vilain.net>
Date
Oct 24, 2007, 00:43 UTC
Message-ID
<471E9547.2030100@vilain.net>
In-Reply-To
<20071023060812.GA30978@glandium.org>
Mike Hommey wrote:
Show 9 quoted lines
> On Mon, Oct 22, 2007 at 10:46:28PM -0700, Adam Roben wrote:
>> This patch series makes git-svn fetch about 1.7x faster by reducing the number
>> of forks/execs that occur for each file retrieved from Subversion. To do so, a
>> few new options are added to git-cat-file and git-hash-object to allow
>> continuous input on stdin and continuous output on stdout, so that one instance
>> of each of these commands can be kept running for the duration of the fetch.
> 
> You don't need to do this to avoid forks. Just use git-fast-import
> instead.
git-fast-import only covers the hash-object side of things, not cat-file.

git-fast-import does not currently suit 'gradual deployment' for converters such as git-svn, because it;

  - returns object IDs at the end, when you checkpoint.
    This could be 'fixed' by allowing a marks log file instead of or in
    addition to the current behaviour, though if the exporter is
    continually waiting for the tokens rather than using marks, it will
    slow it down.
  - you can't use plumbing commands, such as rev-parse, cat-file, etc on
    objects which have not been checkpointed yet.
  - can't just stream a file of unknown length to it as you can to
    hash-object

These are the design trade-offs of using fast-import. Using fast-import, you are creating a 'transaction' area which uses user sequences instead of (git)database-issued identifiers. And this transaction is isolated from the other concurrent users of the object database. However the interface does not have the full git CLI available to it, so unlike a regular database transaction, you end up having to care.

Rewriting the importer so as to correctly deal with these problems is quite challenging, and for slow import sources such as Subversion, of limited merit.

Sam.
Previous: Adam Roben
Message 24 of 24 in “Make git-svn fetch ~1.7x faster”
  1. 0/9 Make git-svn fetch ~1.7x fasterAdam Roben, Oct 23, 2007
  2. 1/9 Add tests for git cat-fileAdam Roben, Oct 23, 2007
  3. 2/9 git-cat-file: Small refactor of cmd_cat_fileAdam Roben, Oct 23, 2007
  4. 3/9 git-cat-file: Make option parsing a little more flexibleAdam Roben, Oct 23, 2007
  5. 4/9 git-cat-file: Add --stdin optionAdam Roben, Oct 23, 2007
  6. 5/9 git-cat-file: Add --separator optionAdam Roben, Oct 23, 2007
  7. 6/9 Add tests for git hash-objectAdam Roben, Oct 23, 2007
  8. 7/9 git-hash-object: Add --stdin-paths optionAdam Roben, Oct 23, 2007
  9. 8/9 Git.pm: Add command_bidi_pipe and command_close_bidi_pipeAdam Roben, Oct 23, 2007
  10. 9/9 git-svn: Make fetch ~1.7x fasterAdam Roben, Oct 23, 2007
  11. Johannes SixtOct 23, 2007
  12. Eric WongOct 24, 2007
  13. Adam RobenOct 24, 2007
  14. Shawn O. PearceOct 23, 2007
  15. Adam RobenOct 23, 2007
  16. Shawn O. PearceOct 23, 2007
  17. Eric WongOct 24, 2007
  18. Johannes SixtOct 23, 2007
  19. Brian DowningOct 24, 2007
  20. Adam RobenOct 24, 2007
  21. Johannes SixtOct 23, 2007
  22. Mike HommeyOct 23, 2007
  23. Adam RobenOct 23, 2007
  24. Sam VilainOct 24, 2007

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.