RFC: startup time - again

Alexander Belchenko bialix at ukr.net
Thu Sep 11 17:37:09 BST 2008

Mark Hammond пишет:
> Hi Alex,
>> but if you throw away test suite for library.zip it's also a bit
>> faster.
> Have you measured how much faster?  I'm surprised that the extra unused modules in the .zip file cause a noticeable difference - or do you think that some of the modules are actually being imported even though things work fine when they do not exist, and that accounts for the difference?

Here is the numbers for 1.6.1 with and without tests.

Full bzrlib with tests:

C:\Temp\bzr-1.6.1\win32_bzr.exe>timeit bzr.exe --no-plugins --no-aliases rocks
It sure does!

time: 0.297

Without tests and benchmarks:

C:\Temp\bzr-1.6.1-wo-test\win32_bzr.exe>timeit bzr.exe --no-plugins --no-aliases rocks
It sure does!

time: 0.281

So I get about 16 ms win, i.e. >5% speedup. Does it big or small? For me it's enough big.
There is another 3-5 places where I can get additional 16ms speedup on each.
So in sum I could get about 80ms speedup. Does it big or small?

In the same time library.zip without tests/benchmarks is thinner: 11MB -> 7MB
(in python sources from 9MB of bzrlib about 4.9MB weights tests and benchmarks).

PS: It seems like my timeit utitlity has the same bug as time.time() on Windows:
it has precision of 16 ms. I need to rewrite it to have more precise results.
I'll try to find implementation of time.clock() in Python sources. Anybody could
give me a hint?

More information about the bazaar mailing list