Merge lp:~jameinel/loggerhead/known_graph into lp:loggerhead
Status: | Work in progress |
---|---|
Proposed branch: | lp:~jameinel/loggerhead/known_graph |
Merge into: | lp:loggerhead |
Diff against target: |
148 lines (+71/-35) 3 files modified
.bzrignore (+1/-0) __init__.py (+2/-2) loggerhead/wholehistory.py (+68/-33) |
To merge this branch: | bzr merge lp:~jameinel/loggerhead/known_graph |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Clatworthy (community) | Needs Information | ||
Review via email: mp+22394@code.launchpad.net |
Commit message
Use bzrlib.
Description of the change
Changes one of the internal 'compute' steps into using some of the faster apis that we've put into bzrlib.
I tried to keep the change fairly self contained, the results seem to show it being worthwhile.
Basically, instead of using 'branch.
1) The fast-path code for loading ancestry out of the btree indexes (loads multiple revisions at a
time, rather than iterating over get_parent_map())
2) Uses the faster KnownGraph api rather than merge_sort, et al. topo_sort.
*not* compile-optimized. (ATM because of a recursive definition between topo_sort.
then non-compiled python code.)
This also should improve things wrt getting child keys, as the KnownGraph already has computed
all the children. (Rather than iterating over the graph again and rebuilding the child tuples.)
3) Uses gc.disable(
with some of the graph stuff. We build a lot of python objects, but they all stay around, and
don't participate in cycles. So gc.collect() running just slows us down.
4) Results:
# orig known_graph gc.disable
# bzr.dev 2.357 0.900 0.700
# mysql 4.353 2.563 1.634
So the final result is that 'compute_
Unmerged revisions
- 411. By John A Meinel
-
More comment cleanup.
- 410. By John A Meinel
-
Clean out some of the extra cruft. Leaving in some as comments.
- 409. By John A Meinel
-
Some timing and memory perf from using StaticTuple.
- 408. By John A Meinel
-
Some timing results using mysql.
Shows a total speed up of around 2.5x => 3.3x. Ideally we'd do better,
but at least this is better than what we had. - 407. By John A Meinel
-
Significant wins by using get_known_
graph_ancestry. - 406. By John A Meinel
-
We don't really need nanosecond resolution.
- 405. By John A Meinel
-
A few little tweaks.
Move it out into a separate function so we can profile the work done,
disabling gc while running drops it from 900ms down to around 700ms. - 404. By John A Meinel
-
Fix a bunch of typos, etc. It at least seems to be working.
- 403. By John A Meinel
-
An initial attempt at using KnownGraph as the graph workhorse.
You're no longer using _strip_NULL_ghosts. Either it's a bug, or you can remove that function from wholehistory.py. :D
(I'll try this out, but there's no way I'm smart enough to really review it.)