[MERGE] log|less 590% to 727% faster
Aaron Bentley
aaron.bentley at utoronto.ca
Sun Jun 18 00:54:22 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
>>> IIRC, the issue is that we want to avoid importing tokenize, because of
>>> its various and funky regexes. Which we should be able to accomplish
>>> using this method, right?
>
> Yep. I specifically did:
> demandload(globals(), 'inspect tokenize')
> sys.modules['inspect'] = inspect
> sys.modules['tokenize'] = tokenize
>
> The way this demandload works is that when someone grabs an attribute,
> it replaces itself. There is a problem with my module hacking version,
> which means that 'copy()' will always be going through an attribute to
> get to 'inspect'.
I thought the only problem with inspect was that it imported tokenize,
which demandloading would fix. No?
> Yeah, I agree. I don't think my demandload branch is good for merging.
> But I think we can look into doing it right now that I have experience
> with what is actually costing us time.
>
> The first pass would be to include my custom importer, which lets us run
> 'bzr --profile-imports foo', and records the amount of time compiling
> all regexes, and importing objects.
That sounds very useful.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFElJYu0F+nu1YWqI0RApA/AJ9A7tNDvKtnet7p28Vjr4oI2J/8dwCeMrhA
BA4bW/s2mXPa//lKvMUi2kY=
=Zz5O
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list