Rev 4414: Remove the @needs_read_lock around _get_rules_searcher. in http://bazaar.launchpad.net/~jameinel/bzr/1.16-no-read-lock
John Arbash Meinel
john at arbash-meinel.com
Fri Jun 5 21:28:23 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.16-no-read-lock
------------------------------------------------------------
revno: 4414
revision-id: john at arbash-meinel.com-20090605202758-ogqjycy02xgjwacv
parent: pqm at pqm.ubuntu.com-20090605081039-abvojdsxjbg5i4ff
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.16-no-read-lock
timestamp: Fri 2009-06-05 15:27:58 -0500
message:
Remove the @needs_read_lock around _get_rules_searcher.
It is a function called for *every* file being committed.
This ends up costing around 1% of runtime just dealing with the lock counters.
Though also the lock/unlock is chained down to branch and thus to repo,
and other such calls.
-------------- next part --------------
=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py 2009-05-28 07:56:59 +0000
+++ b/bzrlib/tree.py 2009-06-05 20:27:58 +0000
@@ -693,7 +693,6 @@
for path in path_names:
yield searcher.get_items(path)
- @needs_read_lock
def _get_rules_searcher(self, default_searcher):
"""Get the RulesSearcher for this tree given the default one."""
searcher = default_searcher
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py 2009-06-03 01:43:22 +0000
+++ b/bzrlib/workingtree.py 2009-06-05 20:27:58 +0000
@@ -2539,7 +2539,6 @@
"""
return
- @needs_read_lock
def _get_rules_searcher(self, default_searcher):
"""See Tree._get_rules_searcher."""
if self._rules_searcher is None:
More information about the bazaar-commits
mailing list