Gary van der Merwe wrote:
> On 01/06/10 17:52, John A Meinel wrote:
>> We intentionally don't support it for installed bzr
>
> Why? I would like to profile imports on my installed copy.
>
We have the module as a top-level object so that we can import it early
on (before importing any of bzrlib). Otherwise doing "import
bzrlib.profile_imports" would automatically trigger importing bzrlib
which is what we are trying to profile.
As such, it wasn't seen as clean to put 'profile_imports.py' as a
top-level module in the global python namespace. It could be done, but
it doesn't seem particularly beneficial.
I'm not sure what it would take to put it into the installer, I *think*
it would just end up in library.zip which would be fine.
I'm also pretty sure the code is a bit hackish and likely to suffer
across multiple python versions.
Obviously if there is a strong push, we could do something about it. If
you really want that functionality, you could always put
'profile_imports.py' into your PYTHONPATH manually.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gary van der Merwe wrote:
> On 01/06/10 17:52, John A Meinel wrote:
>> We intentionally don't support it for installed bzr
>
> Why? I would like to profile imports on my installed copy.
>
We have the module as a top-level object so that we can import it early profile_ imports" would automatically trigger importing bzrlib
on (before importing any of bzrlib). Otherwise doing "import
bzrlib.
which is what we are trying to profile.
As such, it wasn't seen as clean to put 'profile_ imports. py' as a
top-level module in the global python namespace. It could be done, but
it doesn't seem particularly beneficial.
I'm not sure what it would take to put it into the installer, I *think*
it would just end up in library.zip which would be fine.
I'm also pretty sure the code is a bit hackish and likely to suffer
across multiple python versions.
Obviously if there is a strong push, we could do something about it. If imports. py' into your PYTHONPATH manually.
you really want that functionality, you could always put
'profile_
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
FZu0ACgkQJdeBCY SNAANYaQCguPCca LFoubtrSebxYqHi m+LU Y803gtbKyMLPzd3 mVlEcAf5Ju
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkw
bBwAn2+
=JtV6
-----END PGP SIGNATURE-----