[PATCH 0 of 1] diffstat in command templates
mpm at selenic.com
Fri Jan 23 12:17:35 CST 2009
On Fri, 2009-01-23 at 13:37 +0100, Dirkjan Ochtman wrote:
> On 23/01/2009 12:57, Alexander Solovyov wrote:
> > About the code: "log.parents(changenode)" is used for determining
> > parent, but there was suggestions to use "ctx.parents()". But same code
> > is used higher, f.e. in "getfiles()", so maybe whole function should be
> > updated.
> I experimented with that, but I'm fairly sure it's a bit slower.
All new code should be using the context approach unless it's especially
performance critical. If your code visits the disk, it's going to be too
slow for this sort of optimization to be visible.
We will eventually change most of the underlying revlog and context
logic to use only revision numbers, which will improve performance for
lookups. Adding new code which uses the old node-based methods just
makes this harder.
Also it looks like doing a log -p with a diffstat will compute the diff
twice, am I missing something?
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel