##// END OF EJS Templates
revset: improve performance of _generatorset.__contains__ (issue 4201)...
revset: improve performance of _generatorset.__contains__ (issue 4201) _generatorset.__contains__ and __contains__ from child classes were calling into __iter__ to look for values. Since all previously-encountered values from the generator were cached and checked in __contains__ before this iteration, __contains__ was effectively performing iteration busy work which could lead to an explosion of redundant work. This patch changes __contains__ to be more intelligent. Instead of looking at all values via __iter__, __contains__ will instead go straight to "new" values from the underlying generator. On a clone of the Firefox repository with around 200,000 changesets, this patch decreases the execution time of the revset '::(200067)::' from ~100s to ~4s on the author's machine. Rebase operations (which use the aforementioned revset), speed up accordingly.

File last commit:

r18526:9409aeaa stable
r20828:3210b793 default
Show More
changelogentry.tmpl
16 lines | 534 B | application/x-cheetah | CheetahLexer
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <entry>
<title>{desc|strip|firstline|strip|escape|nonempty}</title>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <id>{urlbase}{url|urlescape}#changeset-{node}</id>
<link href="{urlbase}{url|urlescape}rev/{node|short}"/>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <author>
<name>{author|person|escape}</name>
<email>{author|email|obfuscate}</email>
</author>
<updated>{date|rfc3339date}</updated>
<published>{date|rfc3339date}</published>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre xml:space="preserve">{desc|escape|nonempty}</pre>
</div>
</content>
</entry>