show: document why accidentally quadratic is (probably) acceptable
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 03 Jul 2017 21:26:39 -0700
changeset 33211 f48422ab81aa
parent 33210 b93df142485e
child 33212 fe0667cc521e
show: document why accidentally quadratic is (probably) acceptable
hgext/show.py
--- a/hgext/show.py	Mon Jul 03 21:18:32 2017 -0700
+++ b/hgext/show.py	Mon Jul 03 21:26:39 2017 -0700
@@ -215,6 +215,11 @@
 
         stackrevs.add(ctx.rev())
 
+        # ctx.children() within a function iterating on descandants
+        # potentially has severe performance concerns because revlog.children()
+        # iterates over all revisions after ctx's node. However, the number of
+        # draft changesets should be a reasonably small number. So even if
+        # this is quadratic, the perf impact should be minimal.
         if len(ctx.children()) > 1:
             branchpointattip = True
             break