Using psyco acceleration
Andrew Bennetts
andrew at canonical.com
Tue Mar 7 01:15:24 GMT 2006
On Sun, Mar 05, 2006 at 06:35:09PM -0500, John Dong wrote:
> efficient or inefficient, it's still a good start as I see no performance
> loss (but a decent performance gain) from using it in background mode. It'd
> be better, yes, if we can do some more precise profiling on it.
I've seen performance loss with psyco and other python apps. It's possible that
for some bzr commands, it will slow things down (although the fact you're seeing
a speedup for at least one operation is a good sign).
It also tends to cause messages like "Exception psyco.error: 'function has free
variables' in <frame object at 0x81b0554> ignored" -- I saw this just now using
psyco with "bzr reconcile" (I was trying it out to get a rough sense of how much
psyco would or wouldn't help).
So it's not a risk-free optimisation.
On Sun, Mar 05, 2006 at 08:51:24PM -0500, John Dong wrote:
> bzr is such a small (code size wise, compared to some other python beasts)
> that I don't think it's a concern, but nonetheless I'll bear it in mind in
> my future testing.
The memory impact of psyco isn't necessarily directly related to code size --
part of the way it speeds things up is by effectively memoizing the results of
certain functions. Again, something to watch out for.
-Andrew.
More information about the bazaar
mailing list