New developer introduction

Alexander Belchenko bialix at ukr.net
Mon Mar 10 21:38:27 GMT 2008


John Arbash Meinel пишет:
> Wouter van Heyst wrote:
> | On Mon, Mar 10, 2008 at 09:08:14PM +0200, Alexander Belchenko wrote:
> |
> | ...
> |
> |> And I always can continue to build for myself standalone installer.
> |> Because py2exe'd version is noticeable faster for me at startup :-P
> |
> | That is an interesting side effect I hadn't considered. I wonder if that
> | is similar to Martin's experimental blat-everything-to-one-file
> | speedups.
> |
> | Alexander: do you have measurements on how much faster it is?
> |
> | Wouter van Heyst

Here are numbers for bzr 1.2:

C:\work\Bazaar\releases\bzr-1.2>timeit python bzr --no-plugins --no-aliases rocks
It sure does!

time: 0.406


C:\Program Files\Bazaar>timeit bzr.exe --no-plugins --no-aliases rocks
It sure does!

time: 0.218

(Time in seconds.)

> Alexander, any chance you could copy the "profile_imports.py" file over 
> and give
> me the results for the standalone version versus the py2exe one?

Note: standalone version is the same as py2exe version.
So I'm attaching profiling info for python version and bzr.exe.

> I'm guessing the big difference is just that sys.path has been dramatically
> streamlined by py2exe. So it only has a few possible places to look for 
> files.

Yes, it is. In first place. But zipping everything to library.zip is also
helps reduce start-up time a bit.

> I know at our last sprint Andrew Bennetts did some testing about 
> python's odd
> search for modules. IIRC he found that from a cold start, a plain 'bzr 
> status'
> was taking 7s. Copying the open and stat calls (as reported by strace) 
> took 3s.
> (So loading modules was taking 50% of a cold-stat test.) However, when he
> streamlined it it still took 2.7s.
> 
> Anyway, I'm curious why the standalone is being so much faster, and I 
> wonder if
> we can't get some of that from the setuptools eggs. We have to figure 
> out how we
> want to handle plugins in that case, but you are already trying to 
> address that
> by giving a system-wide plugin install directory, outside of 
> bzrlib/plugins.
> 
> John
> =:->
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: profile-bzr.py.txt
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080310/93acbe45/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: profile-bzr.exe.txt
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080310/93acbe45/attachment-0001.txt 


More information about the bazaar mailing list