revlog: document high frequency of code execution
Recording my notes while working on performance optimization.
--- 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