[PATCH 0 of 2] context, keyword: reduce use cases of expensive filectx.cmp

Martin Geisler mg at aragost.com
Fri Oct 15 08:42:15 CDT 2010


Nicolas Dumazet <nicdumz at gmail.com> writes:

> 2010/10/14 Christian Ebert <blacktrash at gmx.net>:
>> Hi,
>>
>> Only compare via filelog when needed, i.e. when comparing
>> against the working directory.
>
> Great, thanks.
>
>> These patches use isinstance(fctx, context.workingfilectx) to
>> check this.
>
> I've been told on IRC that it was actually a bad idea, because
> mem(file?)ctx do not inherit from workingfilectx.

Also, isinstance is slow and becomes slower the longer the inheritance
chain is.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list