Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/deltas.py @ 41033:b373477948df
revlog: limit base to rev size ratio to 500 instead of 50
While a value of 50 provided large speedup in some case (400s ? 7s) it also
creates a slow down for a whole class of revision we are seeing in a private
repository (0.1s ? 3s). A value of 500 makes them disappear improving the
total runtime (the slower revision still improve significantly (400s ? 21s)).
We need to run a wider array of tests on various repositories to see the
effect on speed and size of different values for this acceptable constant.
However, in the meantime, it seems safer to move back to a less impactful
value.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 19 Dec 2018 10:54:25 +0100 |
parents | ba09db267cb6 |
children | 88d813cd9acd |
comparison
equal
deleted
inserted
replaced
41032:9f06cd72cccb | 41033:b373477948df |
---|---|
602 return True | 602 return True |
603 | 603 |
604 # If a revision's full text is that much bigger than a base candidate full | 604 # If a revision's full text is that much bigger than a base candidate full |
605 # text's, it is very unlikely that it will produce a valid delta. We no longer | 605 # text's, it is very unlikely that it will produce a valid delta. We no longer |
606 # consider these candidates. | 606 # consider these candidates. |
607 LIMIT_BASE2TEXT = 50 | 607 LIMIT_BASE2TEXT = 500 |
608 | 608 |
609 def _candidategroups(revlog, textlen, p1, p2, cachedelta): | 609 def _candidategroups(revlog, textlen, p1, p2, cachedelta): |
610 """Provides group of revision to be tested as delta base | 610 """Provides group of revision to be tested as delta base |
611 | 611 |
612 This top level function focus on emitting groups with unique and worthwhile | 612 This top level function focus on emitting groups with unique and worthwhile |