# HG changeset patch # User Gregory Szorc # Date 1499142399 25200 # Node ID f48422ab81aa967fc99f90e658a4539cc3eff930 # Parent b93df142485e8431746abac1f0ed5c20c0eaf0c4 show: document why accidentally quadratic is (probably) acceptable diff -r b93df142485e -r f48422ab81aa 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