[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [RFH] git-log vs git-rev-list performance
From:       "Marco Costalba" <mcostalba () gmail ! com>
Date:       2007-12-29 20:05:11
Message-ID: e5bfff550712291205m56521977tfe380969e06e93d4 () mail ! gmail ! com
[Download RAW message or body]

On Dec 29, 2007 7:51 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>
> On Sat, 29 Dec 2007, Marco Costalba wrote:
> >
> > [marco@localhost linux-2.6]$ time git log --topo-order --no-color
> > --parents --boundary -z --log-size
> > --pretty=format:"%m%HX%PX%n%an<%ae>%n%at%n%s%n%b" HEAD > /dev/null
>
> Don't compare "--pretty=format" to the pre-formatted versions.
>
> Use "--pretty=raw" for "git log" if you want to approximate "git
> rev-list --header".
>

I have switched to --pretty=format instead of preformatted one to save
RAM, becuase needed memory is about 35% less with a custom format, the
preformatted ones give me additional info that is not shown on qgit so
it's just a waste.

As example a full Linux tree loaded with qgit takes less then 80MB,
with gitk as comparison we are above 400MB although of course the
optimized format is not the whole reason for this difference.

What I have seen looking expecially at the pretty.c sources with a
profiler is that the custom format is continuosly reparsed _for each
revision_ also if it never changes during the whole git-log run. This
could explain why the custom format although cheaper in terms of
quantity of outputted data is slower then a preformatted one.

A caching of the parsed custom --pretty=format at the beginning of
git-log could help...

Marco
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic