[PATCH] Calculate file sha1 in block
Martin Pool
mbp at sourcefrog.net
Sat Apr 16 23:28:01 BST 2005
On Sat, 2005-04-16 at 19:44 +0200, Fredrik Lundh wrote:
> > def sha_file(f):
> > - import sha
>
> footnote: I don't know if martin's done this on purpose, but one common
> reason to import modules inside functions/methods is to avoid the import
> cost for command invocations that never calls the function.
I was aware of that. I haven't done it systematically so far, but I
really should do it to reduce the startup overhead. I suspect 'bzr
version' takes several times as long as it should because it loads a lot
of modules. (Not that bzr version really matters but there are other
cases which do.)
Is there anything else we can do in the future to reduce the startup
time?
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050417/b609535c/attachment.pgp
More information about the bazaar
mailing list