should have deterministic effort tests for code loading and startup time
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.
Now fixed in trunk through test_import_tariff. Needs more specific tests added.