Matt Mackall <mpm@selenic.com> [Mon, 31 Dec 2007 18:20:34 -0600] rev 5773
bisect: merge ancestor lists when pushing to children
- eliminate some redundant tests and assignments
- move ancestor list merging to child update
Matt Mackall <mpm@selenic.com> [Mon, 31 Dec 2007 18:20:34 -0600] rev 5772
bisect: skip calculations on candidates with too many ancestors
Once an ancestor list has grown past the perfect threshold, all
descendants are less optimal. Use a poison dict to avoid pointless
operations on their long ancestor lists, thus eliminating most of the
work.
Matt Mackall <mpm@selenic.com> [Mon, 31 Dec 2007 18:20:34 -0600] rev 5771
bisect: stop early if we find a perfect candidate
Matt Mackall <mpm@selenic.com> [Mon, 31 Dec 2007 18:20:34 -0600] rev 5770
bisect: find best node in ancestor collection pass
Matt Mackall <mpm@selenic.com> [Mon, 31 Dec 2007 18:20:33 -0600] rev 5769
bisect: calculate candidate set while finding children
Matt Mackall <mpm@selenic.com> [Mon, 31 Dec 2007 18:20:33 -0600] rev 5768
bisect: use a dict for children
We fill in the children only for ancestors of badrev
Matt Mackall <mpm@selenic.com> [Mon, 31 Dec 2007 18:20:33 -0600] rev 5767
bisect: propagate ancestor lists directly to children
- calculate the children of all candidates
- for each candidate, combine ancestor lists
- pass ancestor lists to children
- store ancestor count
This eliminates the O(n**2) memory usage, while maintaining about the
same performance.