Merge lp:~gz/bzr/support_OO_flag_installer into lp:bzr
| Status: | Merged |
|---|---|
| Approved by: | Robert Collins on 2010-05-27 |
| Approved revision: | 5197 |
| Merged at revision: | 5260 |
| Proposed branch: | lp:~gz/bzr/support_OO_flag_installer |
| Merge into: | lp:bzr |
| Diff against target: |
50 lines (+11/-7) 2 files modified
NEWS (+6/-0) setup.py (+5/-7) |
| To merge this branch: | bzr merge lp:~gz/bzr/support_OO_flag_installer |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Robert Collins (community) | Approve on 2010-05-27 | ||
| John A Meinel | 2010-04-30 | Needs Information on 2010-05-18 | |
| Alexander Belchenko | Approve on 2010-05-10 | ||
|
Review via email:
|
|||
Commit Message
Make the installer on windows strip non-plugin docstrings.
Description of the Change
Followup to the branch getting bzrlib to run correctly when docstrings are stripped. This alters the setup script to build the windows standalone installer that way, but should leave plugins untouched as they can be adapted later.
I'm not set up to properly test this here. If someone who builds windows installers can do a before and after, to see if this a) breaks anything and b) helps at all, that would be great.
The library.zip with the 2.1.1 installer is 17.2MB, I'm interested in how much of a saving can be got.
| John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> Review: Approve
> So test this changes one needs to run following commands:
>
> make run
> python setup.py py2exe
>
> (You need to remove `build` directory before you run py2exe because it keeps a cache of py/pyo files).
>
> So, testing bzr.dev revno 5218 and this branch we have:
>
> bzr.dev:
> library.zip = 14 MB
> and entire exe folder (just bzrlib w/o tbzr and other plugins) = 19 MB
>
> This branch (with trunk changes merged):
> library.zip = 11 MB
> and entire exe folder = 17 MB
>
> The numbers from the FAR file manager, so they are not very accurate. So this branch saves about 2-3 MB.
>
Can you run 7zip to generate the LZMA compressed version of both the
pre- and post- patch versions? That will give us a view of how much the
download size will change.
I'm also curious where this will actually help, I would guess it would
be a reasonable cold-start improvement. Though if we really wanted a
change, we would set DEFLATE on the .zip file. Though that would
actually slow down *hot* performance, which isn't great. (w/ hot
performance, everything is already in mem, so adding decompression is
just overhead.)
Anyway, someone did the work, as long as it doesn't break stuff, it is
probably reasonable to use it. I guess few people try to introspect
objects from the all-in-one installer. (I use help(my_branch.foo) all
the time, but from the python interpreter.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkv
cQwAoM18qRZE2UB
=OtOv
-----END PGP SIGNATURE-----
| Alexander Belchenko (bialix) wrote : | # |
Some numbers re (cold) startup time:
The command is: timeit bzr.exe --no-plugins --no-aliases info
For -OO: 2.453 sec
For bzr.dev: 2.656 sec
So the difference is really small (~200 ms).
| Martin Pool (mbp) wrote : | # |
On 11 May 2010 10:26, Alexander Belchenko <email address hidden> wrote:
> Some numbers re (cold) startup time:
>
> The command is: timeit bzr.exe --no-plugins --no-aliases info
>
> For -OO: 2.453 sec
> For bzr.dev: 2.656 sec
>
> So the difference is really small (~200 ms).
Well, it's 7.7% faster. Not a huge amount but they add up.
--
Martin <http://
| Alexander Belchenko (bialix) wrote : | # |
About compressed size difference (the sizes in bytes):
5 074 449 bzr-2.2.
4 542 024 bzr-2.2.
Difference is about 500 KB.
| John A Meinel (jameinel) wrote : | # |
A point of clarification. If I run "python -O ..." then it does *not* load modules named .pyc. As such, won't this break the compiled bzr, since some plugins will get .pyc, but the rest of bzr will be running as "-OO"? Or am I misunderstanding the optimization levels?
Anyway, this seems fine for a 2.2 series, I'd certainly like to have an installer built and someone running it to make sure things are working ok.
| Martin Packman (gz) wrote : | # |
Okay, some more details are warranted.
The py2exe.optimize param has three possible values, 0 meaning __debug__ is True and pyc files are used, 1 meaning __debug__ is False and pyo files are used, and 2 meaning the same as 1 and docstrings are stripped as well.
The current Bazaar installer has ./lib which contains binary extensions and library.zip which contains pyo files for the standard library, bzrlib, and other packages. It also has ./plugins which contains subfolders for each plugin, with both py and pyo files. With this branch merged, all of that will still be the case.
There's one possible gotcha, if people are using the all-in-one installer, and wanting to use extra, unbundled plugins, they'll need to install with the right params to get -O style files or they'll be runtime-compiled without docstrings.
It'd be great if Ian or someone could build a whole installer after this has landed so it can get some field testing.
| Robert Collins (lifeless) wrote : | # |
Martin[gz] - please pick a date for when we'll change the rules on plugins, so that we can tell plugin authors clearly, now. And add a NEWS item to assist in that communication.
Other than that I think you've addressed jam's info request and should land this. You do have landing rights, don't you ?
| Martin Packman (gz) wrote : | # |
> Martin[gz] - please pick a date for when we'll change the rules on plugins, so
> that we can tell plugin authors clearly, now. And add a NEWS item to assist in
> that communication.
Well, the main branch for this had documentation for plugin authors and news summarising the change. I agree picking a date and clearly communicating it is a good idea, but wouldn't that be better done on the mailing list or something? Will add more news saying the windows all-in-one installer has been switched over, but really I want to make sure this change can actually stick before making a big fuss.
> Other than that I think you've addressed jam's info request and should land
> this. You do have landing rights, don't you ?
Not that I know of.
- 5197. By Martin Packman on 2010-05-25
-
NEWS entry for change to all-in-one Windows installer
| Robert Collins (lifeless) wrote : | # |
I don't mind where it is done, but I think we should have it to land the change. What you've written is sufficient now, but please do discuss on the list - and then come back and update the NEWS entry.
| Robert Collins (lifeless) wrote : | # |
sent to pqm by email

So test this changes one needs to run following commands:
make run
python setup.py py2exe
(You need to remove `build` directory before you run py2exe because it keeps a cache of py/pyo files).
So, testing bzr.dev revno 5218 and this branch we have:
bzr.dev:
library.zip = 14 MB
and entire exe folder (just bzrlib w/o tbzr and other plugins) = 19 MB
This branch (with trunk changes merged):
library.zip = 11 MB
and entire exe folder = 17 MB
The numbers from the FAR file manager, so they are not very accurate. So this branch saves about 2-3 MB.