changeset 30012:60a66c79125f

revlog: document high frequency of code execution Recording my notes while working on performance optimization.
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 24 Aug 2016 20:18:58 -0700
parents d81fe5af92b8
children 1659549870e1
files mercurial/revlog.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Aug 24 20:00:52 2016 -0700
+++ b/mercurial/revlog.py	Wed Aug 24 20:18:58 2016 -0700
@@ -1471,6 +1471,10 @@
         # should we try to build a delta?
         if prev != nullrev:
             tested = set()
+            # This condition is true most of the time when processing
+            # changegroup data into a generaldelta repo. The only time it
+            # isn't true is if this is the first revision in a delta chain
+            # or if ``format.generaldelta=true`` disabled ``lazydeltabase``.
             if cachedelta and self._generaldelta and self._lazydeltabase:
                 # Assume what we received from the server is a good choice
                 # build delta will reuse the cache