should have deterministic effort tests for code loading and startup time

Bug #395997 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Pool

Bug Description

bzr should start up faster. A major factor in starting up is loading code: loading modules takes substantial time in Python, apparently mostly in constructing in-memory representations of classes etc, and it also causes hard faults on cold cache in searching for and reading in files.

It would be nice if there were deterministic effort tests in selftest that made assertions about which modules are or are not loaded to run representative commands. For example subprocess seems to be slow, and it should not be necessary for most local operations, so it would be good to test that it is not in fact loaded.

Adding this to selftest would let us immediately catch code changes that are likely to slow load time. We could also add this as a metric in usertest and measure more different cases to look for trends.

Revision history for this message
Martin Pool (mbp) wrote :

Now fixed in trunk through test_import_tariff. Needs more specific tests added.

Changed in bzr:
milestone: none → 2.2.0b1
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.