# HG changeset patch # User Gregory Szorc <gregory.szorc@gmail.com> # Date 2016-08-25 03:18:58 # Node ID 60a66c79125fd87f71f920d47e452fc402a41e86 # Parent d81fe5af92b810f07c61575a0675a00b47724e5f revlog: document high frequency of code execution Recording my notes while working on performance optimization. diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1471,6 +1471,10 @@ class revlog(object): # 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