[MERGE] Add contrib/bzr_access

John Arbash Meinel john at arbash-meinel.com
Tue Dec 11 15:05:03 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> Aaron Bentley has voted resubmit.
> Status is now: Resubmit
> Comment:
> At minimum, this needs a license before we can include it.  It would
> also be nice to use ConfigObj rather than ConfigParser.
> 

Using 'ConfigObj' means it has to import bzrlib, but it is explicitly designed
to be able to use a different bzr executable at runtime.

I've considered rewriting bits of it to have it import bzrlib directly and get
rid of the extra command line parameter. But for now they are fairly separate.

I'm also not quite as convinced about our decision to use ConfigObj. It is
currently one of the #1 slowdowns for startup performance. Specifically, its
regex for supporting lists costs us a lot, and AFAIK we don't actually ever use
it. We do lazy build that regex, but it doesn't matter because the first config
file it parses forces all of those regex's to be used.



Just to give some numbers, using "bzr --no-plugins --profile-imports rocks"
gives me 115ms total to import bzrlib, and of that 75ms is spent by ConfigObj.
(and the other 29ms is spent in from bzrlib.osutils import get_user_encoding).

And we have to use it because that is how we do our aliases.

On my Mac laptop it changes to 334ms for bzrlib, 125ms for import
get_user_encoding, and 182ms for configobj.

Either way, approx 50% of our trivial startup time is because of ConfigObj.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHXqcfJdeBCYSNAAMRAounAJ0dT0uWF3oHBNUcVgpcBilDZsEnHACgnHYx
S1TSfhYsBYY6DcIsxd+LfWU=
=vyzA
-----END PGP SIGNATURE-----



More information about the bazaar mailing list