[PLUGIN] bzr_difftools performance enhancement
Stephen Ward
sward.dev at verizon.net
Mon Nov 20 05:43:09 GMT 2006
Hi,
I've updated the bzr_difftools plugin with a significant reduction in
the 'import' cost that would affect any user of this plugin.
With all the recent lazy_import improvements to the core, it had reached the
point where the plugin was adding 50% to the time it takes to run 'bzr
rocks'. That still isn't a lot of time in any absolute sense, but it is
depressingly large in percentage terms.
With this change, that startup overhead has been reduced to 1%.
This was done by minimizing the initial 'import' list as much as possible, and
leaving the heavy lifting for when the command is actually run - so the cost
is still there, but now it only affects the 'diff' command itself.
I also looked at using lazy_import within the plugin code, but that was not as
effective in this case (it cut the overhead from 50% to 21%).
The updated code is available from the usual locations (see the Plugin
Registry).
-- Steve
More information about the bazaar
mailing list