[MERGE] Faster commit
Ian Clatworthy
ian.clatworthy at internode.on.net
Mon Jun 4 06:12:57 BST 2007
The attached bundle speeds up commit, one of the areas of Bazaar most in
need of improvement for large trees. It has a noticeable impact: 50%
quicker for small commits and up to the same for the initial commit.
In summary, the changes do the following:
1. buffer the report of commit messages until the end
2. remove calls to dirstate._validate that shouldn't be in production
code
3. remove locking around some low level workingtree_4 calls, namely
id2path, kind and is_executable
4. minor code clean-ups in commit.py
5. documentation related to commit's performance: Martin's analysis of
commit (for the London sprint) and follow-up advice from Aaron and
John re restructuring the code.
The follow-up emails I received on the correctness of buffering commit
messages at the end suggested that yes, gnome-terminal is real slow, and
that it probably doesn't matter if and when we report what commit does
given some competitive systems (Hg and Git) don't bother reporting it at
all. I'd very much like to leave it at the end for the reasons outlined
previously (https://lists.ubuntu.com/archives/bazaar/2007q2/026089.html)
and I'm pleased we have a better UI than other tools. FWIW, it is very
easy with this patch to toggle the behaviour by changing how a variable
is initialised. Of course, that doesn't resolve the complaint that the
buffering code adds complexity (even if not much of it).
John provided some alternatives w.r.t. locking directions. I think this
is an important area for improvement given the coding tensions involved:
low level implicit locking is safer and makes the API nicer *but* it can
and does hurt us a lot performance wise. I've gone with selected low
level lock removal and some better documentation for now. Is that
enough??? Do tests need changing? (All current tests pass, of course.)
As previously mentioned, I'd like to thanks Aaron, John and Robert for
some off list emails explaining some of the complexity behind commit.
That is now captured in a doc in doc/developers, together with Martin's
email on 'minimum case' commit performance.
Together with John's work on status/diff and Aaron's work on
merge/bundle/checkout/branch, I'm very keen to get this through for
0.17. If the reviewers can let me know ASAP what needs to be changed or
dropped to get this through, I'd greatly appreciate it.
Thanks,
Ian C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commit-cleanup-and-faster3.patch
Type: text/x-patch
Size: 91408 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070604/4b41a50c/attachment-0001.bin
More information about the bazaar
mailing list