[patch] list files with status prefix on log -v

Matt Mackall mpm at selenic.com
Wed Jul 13 06:18:22 UTC 2005


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.

Reading the manifest is the slowest operation in the system. A kernel
manifest is > 1M. Constructing it can require applying several thousand
small patches.

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.

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.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list