[PATCH 3 of 3 STABLE V2] changectx: do not include hidden revisions on short node lookup (issue4964)
Jun Wu
quark at fb.com
Tue Nov 1 12:17:57 EDT 2016
Excerpts from Pierre-Yves David's message of 2016-11-01 16:59:36 +0100:
> So, just to confirm, the performance impact will only show up in case
> where we would have raised and ambiguity error anyway ? So in the only
> behavior/performance impact we'll see is a move from an abort to a
> slightly slower lookup. Am I right ?
Yes. But the slower (much much slower) lookup is likely to end up with the
same abort error. For example, if the user types a very short hash, which is
definitely causing a ambiguity, the old code would return instantly, where
the new one will be slowed down very much.
Some places even use unfiltered repo as a workaround for the performance
issue:
https://www.mercurial-scm.org/repo/hg/file/cac4ca036dff/mercurial/templater.py#l840
So I'd suggest not include this one for now as the perf impact can be
potentially huge. I'll be looking into the most correct fix: teaching the
radix tree about the "hidden" concept.
More information about the Mercurial-devel
mailing list