git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcus Griep <marcus@griep.us>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Eric Wong <normalperson@yhbt.net>
Subject: Re: [PATCH] git-svn: Make it scream by minimizing temp files
Date: Fri, 08 Aug 2008 21:12:38 -0400	[thread overview]
Message-ID: <489CEF06.7050204@griep.us> (raw)
In-Reply-To: <7vd4kjazaz.fsf@gitster.siamese.dyndns.org>

I am working on that right now; however, against master I am getting
checksum mismatches with my svn repository, so generating benchmarks
against that requires committing a revert of ffe256f9, which makes
things even slower. My work comp is running cygwin, and that could be 
why ffe256f9 is a problem.

I am, however using a smaller repository, namely that of the Boo
Programming Language, to run some benchmarks.  I'm running it on a 
Linux box, and I'll publish the results as soon as they are ready.  

I'll include:

ffe256f9 and my patch
ffe256f9 and no patch
revert ffe256f9 and my patch
revert ffe256f9 and no patch

Marcus

Junio C Hamano wrote:
> Marcus Griep <marcus@griep.us> writes:
> 
>> Currently, git-svn would create a temp file on four occasions:
>> 1. Reading a blob out of the object db
>> 2. Creating a delta from svn
>> 3. Hashing and writing a blob into the object db
>> 4. Reading a blob out of the object db (in another place in code)
>>
>> Any time git-svn did the above, it would dutifully create and then
>> delete said temp file.  Unfortunately, this means that between 2-4
>> temporary files are created/deleted per file 'add/modify'-ed in
>> svn (O(n)).  This causes significant overhead and helps the inode
>> counter to spin beautifully.
>>
>> By its nature, git-svn is a serial beast.  Thus, reusing a temp file
>> does not pose significant problems.  "truncate and seek" takes much
>> less time than "unlink and create".  This patch centralizes the
>> tempfile creation and holds onto the tempfile until they are deleted
>> on exit.  This significantly reduces file overhead, now requiring
>> at most three (3) temp files per run (O(1)).
> 
> Beautifully written analysis of the issue being tackled.
> 
> But optimization patch should be backed by numbers --- do you have a
> benchmark result of some sort that you would want to include here?
> 
> 

-- 
Marcus Griep
GPG Key ID: 0x5E968152
——
http://www.boohaunt.net
את.ψο´

  reply	other threads:[~2008-08-09  1:14 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08 22:41 [PATCH] git-svn: Make it scream by minimizing temp files Marcus Griep
2008-08-08 22:59 ` Junio C Hamano
2008-08-09  1:12   ` Marcus Griep [this message]
2008-08-09  6:25 ` Eric Wong
2008-08-09 15:45   ` Marcus Griep
2008-08-10  1:46     ` Eric Wong
2008-08-10  3:53       ` Junio C Hamano
2008-08-10  7:47         ` Eric Wong
2008-08-10  8:26           ` Junio C Hamano
2008-08-10  8:09     ` Eric Wong
2008-08-11 15:53     ` [PATCH 0/3] git-svn and temporary file improvements Marcus Griep
2008-08-11 15:53       ` [PATCH 1/3] Git.pm: Add faculties to allow temp files to be cached Marcus Griep
2008-08-11 15:53         ` [PATCH 2/3] git-svn: Make it scream by minimizing temp files Marcus Griep
2008-08-11 15:53           ` [PATCH 3/3] git-svn: Reduce temp file usage when dealing with non-links Marcus Griep
2008-08-12  3:37             ` Eric Wong
2008-08-12 15:53               ` Marcus Griep
2008-08-12 16:01             ` Marcus Griep
2008-08-12 16:45               ` [PATCH v2 " Marcus Griep
2008-08-13  3:29               ` [PATCH " Eric Wong
2008-08-13  3:42                 ` Marcus Griep
2008-08-13  3:52                   ` Eric Wong
2008-08-12  3:14           ` [PATCH 2/3] git-svn: Make it scream by minimizing temp files Eric Wong
2008-08-12 15:50             ` Marcus Griep
2008-08-12 16:00           ` [PATCH 2/3] git-svn: Make it incrementally faster " Marcus Griep
2008-08-13  3:29             ` Eric Wong
2008-08-12  3:08         ` [PATCH 1/3] Git.pm: Add faculties to allow temp files to be cached Eric Wong
2008-08-12 15:41           ` Marcus Griep
2008-08-12 16:00         ` Marcus Griep
2008-08-13  3:28           ` Eric Wong
2008-08-13 20:05         ` Lea Wiemann
2008-08-13 20:13           ` Marcus Griep
2008-08-13 20:31             ` Marcus Griep
2008-08-13 20:38           ` Junio C Hamano
2008-08-13 22:28             ` Lea Wiemann
2008-08-13 22:30               ` [PATCH] Git.pm: require Perl 5.6.1 Lea Wiemann
2008-08-14  6:58             ` [PATCH 1/3] Git.pm: Add faculties to allow temp files to be cached Eric Wong
2008-08-15 15:10               ` [PATCH] Git.pm: Make File::Spec and File::Temp requirement lazy Marcus Griep
2008-08-15 19:31                 ` Bryan Donlan
2008-08-15 19:46                   ` Marcus Griep
2008-08-15 19:53                 ` [PATCH v2] " Marcus Griep
2008-08-13 20:52           ` [PATCH 1/3] Git.pm: Add faculties to allow temp files to be cached Miklos Vajna
2008-08-14  6:29         ` Junio C Hamano
2008-08-14 14:35           ` Marcus Griep

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=489CEF06.7050204@griep.us \
    --to=marcus@griep.us \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).