Mon, 18 May 2015 21:31:40 -0700 treemanifest: speed up commit using dirty flag
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 May 2015 21:31:40 -0700] rev 25221
treemanifest: speed up commit using dirty flag We currently avoid saving a treemanifest revision if it's the same as one of it's parents. This is checked by comparing the generated text for all three versions. Let's avoid that when possible by comparing the nodeids for clean (not dirty) nodes. On the Mozilla repo, this speeds up commit from 2.836s to 2.343s.
Thu, 26 Feb 2015 08:16:13 -0800 treemanifest: speed up diff by keeping track of dirty nodes
Martin von Zweigbergk <martinvonz@google.com> [Thu, 26 Feb 2015 08:16:13 -0800] rev 25220
treemanifest: speed up diff by keeping track of dirty nodes Since tree manifests have a nodeid per directory, we can avoid diffing entire directories if they have the same nodeid. The comparison is only valid for unmodified treemanifest instances, of course, so we need to keep track of which have been modified. Therefore, let's add a dirty flag to treemanifest indicating whether its nodeid can be trusted. We set it when _files or _dirs is modified, and make diff(), and its cousin filesnotin(), not descend into subdirectories that are the same on both sides. On the Mozilla repo, this speeds up 'hg diff -r .^ -r .' from 1.990s to 1.762s. The improvement will be much larger when we start lazily loading subdirectory manifests.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 tip