[PATCH 6 of 8] hidden: remove _consistencyblockers()

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sat Jun 3 15:38:47 EDT 2017



On 06/03/2017 07:38 PM, Jun Wu wrote:
> Excerpts from Martin von Zweigbergk's message of 2017-06-03 10:05:06 -0700:
>> [...]
>> If all current code paths use the full set (and don't care about order), I
>
> I think we are talking about phase revsets.

No. we are talking about the low level set computation, like in 
'_computeobsoleteset' and 'computehidden'. The revsets are out of the 
scope for that discussion.

The function aboves performs unordered operation on python 'set' object 
and return a python 'set' object.

The phase logic itself is computing and cache python 'set' object. 
Having the phase logic explicitly covert that set to a smartset before 
making it available to this low level function is not necessary and end 
up being harmful for performance.

I just made a small series that allow to skip the smartset conversion 
for these function. It pass tests and reveals a quite significant impact 
from the smartset usage:

In mozilla-central greg development repository:
   before
     obsolete: 0.000885,
     visible:  0.002548
   after
     obsolete: 0.576 ms (-35%)
     visible:  1.098 ms (-57%)

On my Mercurial Core repository:
   before
     obsolete: 1.271 ms
     visible:  3.424 ms
   after
     obsolete: 0.950 ms (-25%)
     visible:  1.882 ms (-45%)

That series is just making existing data available to function that can 
use them. That would be fairly easy to update in the future if we end up 
needing to do so.

In addition, Having a smartset eventually required Martin to do a 
conversion to a set to have an object with the set of feature he needed. 
Since they are intended for revset usage, not as a replacement for 
python 'set'.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list