# HG changeset patch # User Gregory Szorc # Date 1472095138 25200 # Node ID 60a66c79125fd87f71f920d47e452fc402a41e86 # Parent d81fe5af92b810f07c61575a0675a00b47724e5f revlog: document high frequency of code execution Recording my notes while working on performance optimization. diff -r d81fe5af92b8 -r 60a66c79125f mercurial/revlog.py --- 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