Merge lp://staging/~jameinel/bzr-fastimport/mutable-inv-check into lp://staging/bzr-fastimport
Proposed by
John A Meinel
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp://staging/~jameinel/bzr-fastimport/mutable-inv-check |
Merge into: | lp://staging/bzr-fastimport |
Diff against target: |
32 lines (+12/-6) 1 file modified
bzr_commit_handler.py (+12/-6) |
To merge this branch: | bzr merge lp://staging/~jameinel/bzr-fastimport/mutable-inv-check |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Clatworthy | Approve | ||
Review via email:
|
To post a comment you must log in.
This changes one of the inner parts of the commit handler.
Instead of calling "_get_mutable_ inventory( )" so that we can then apply_delta, it just does the create_ by_apply_ delta directly.
This is probably not compatible with some old bzrlib's where Inventory doesn't have a create_ by_apply_ delta attribute.
The arguments for/against:
1) _get_mutable_ inventory( ) has to read the entire chk inventory and convert it into a regular Inventory instance. This is O(tree) always. by_apply_ delta, OTOH is an O(delta) operation.
2) create_
3) The main downside is that when there are directories to be deleted, this will do extra work and save some chk pages that don't end up referenced. However, the frequency that it happens will be quite low, so I think the overhead is okay. (And they won't be copied when branching out of the repo, but I think they will be preserved by a plain 'bzr pack'.)
4) Time-wise this drops converting the xserver stream from 15m30s down to around 14m11s for me. Though the longest time is probably spent in the final pack.
I imagine that the performance improvement will scale with O(tree). So for very large trees (like mysql or OOo) they will see a significant boost here. xserver only has ~2k files so isn't much bigger than bzr itself.