[patch] list files with status prefix on log -v
TK Soh
teekaysoh at yahoo.com
Wed Jul 13 06:45:06 UTC 2005
--- Matt Mackall <mpm at selenic.com> wrote:
> On Tue, Jul 12, 2005 at 10:54:25PM -0700, TK Soh wrote:
> > This patch give the following output format on log -v:
>
> You've just made hg log -v for the kernel repo go from ~1m to probably
> many many hours, if not weeks.
log --debug will do the same, no? The based code was copied from it.
> Reading the manifest is the slowest operation in the system. A kernel
> manifest is > 1M. Constructing it can require applying several thousand
> small patches.
My apology. So far I only deal with relatively same repo, and have never
touched the kernel repo. I will keep this in mind.
> Normally we can use caching to construct manifest n+1 from manifest n
> very quickly. So doing diffs of manifests tends to be subsecond. But
> even still, reading the full manifest 30000 times to do verify was
> making it take over an hour (projected).
>
> And because you're doing this in 'hg log', which walks the history
> backwards, it suddenly becomes O(n**2) because we can't build manifest
> n-1 from manifest n. Instead we have to build it from manifest n-7000
> and 6999 deltas. On top of that, we end up reading the manifest twice
> for each call to changes.
I do not fully understand the mechanism changes() used for pulling the file
lists. Perhaps this can be optimised so that walking in both directions will
carry the same loading?
> It's ok to add some slow operations to hg log. But they can't be tied
> to -v, which has to stay fast for search purposes. This will need its
> own switch, like the one for showing patches.
I very much prefer it to be -v for simplicity sake. But if the performance
impact is so great, it may be the wrong choice. Perhaps it can be -f or -l.
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
More information about the Mercurial
mailing list