[MERGE] hack logging to not always do whole history operations

John Arbash Meinel john at arbash-meinel.com
Fri Mar 14 16:16:57 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Hudson wrote:
> In the continued spirit of
> 
> http://blog.orebokech.com/2008/03/emacs-in-bzr-initial-impressions.html
> 
> I got to thinking that log --line and log --short do not need to do
> whole-history operations.  The result was the attached patch, which is
> rather hackish.
> 
> Here's the good side (in Jason's emacs cvsps-import):
> 
> mwh at grond:trunk$ time bzr log --short -l 10 | wc -l
> 41
> 
> real    0m8.883s
> user    0m8.417s
> sys     0m0.424s
> mwh at grond:trunk$ time ~/src/bzr/cheaper-simple-logging/bzr log --short
> -l 10 | wc -l
> 41
> 
> real    0m0.248s
> user    0m0.216s
> sys     0m0.036s
> 
> (Which is ~45x faster, much more if you take startup time into account).
> 
> But, it makes logging the whole history slower (~60s vs ~45s) -- I guess
> because we're now calling get_revision 80000+ times, not ~1000.  For bzr
> log --short | less usage though, the first few revisions appear much
> more quickly.
> 
> For full log, I guess you could do hacks like, use this approach until
> you see a revision with two parents.  But that would get a bit
> hair-raising I guess.  Or you can do things by graph walking rather than
>  merge_sorting, but this sounds complicated too.  But it's probably
> going to be necessary when we bump into even bigger histories than emacs'.

Well, cvs conversions are fairly unique in having no revisions with 2
parents. There is already a discussion of switching to someone's git
import, since they somehow manage to track merges, etc. (It sounds like
they are doing that manually.)

> 
> Cheers,
> mwh
> 

I haven't had a chance to look over your code changes, as it looks like
some big hunk moves but maybe not a lot of actual content change.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH2qT5JdeBCYSNAAMRAgbhAJ9Yl8079pgpQVTM7/jp+8x2RPryxQCghZ9e
XbWzze0cyLkcOlr0ETgu9vQ=
=HZ2s
-----END PGP SIGNATURE-----



More information about the bazaar mailing list