[ZODB-Dev] profiling zLOG and inspect

Christian Reis kiko at async.com.br
Sun Jun 15 17:19:47 EDT 2003


On Sun, Jun 15, 2003 at 02:57:18PM -0400, Guido van Rossum wrote:
> > I imagine, but the real culprit for slowness is that import inspect for
> > some reason generates a *LOT* of calls to sre_*.py (can't recall
> > exactly, I'm at home).
> 
> I suggest you do some more digging before pointing fingers.  The
> source for inspect doesn't do any of that.  Maybe you're confused by
> tokenize, which does do that.

Yeah; inspect was just one level up (I might have said zLOG, even).

> > There's also the runtime cost of making calls to zLOG that won't do
> > anything. I'd (lambda x: pass) all those calls out (if not
> > environ.has_key()).
> 
> If you submit a patch to do that, we might consider it.  But I expect
> that during the creation of the patch you'll find how inelegant the
> approach you are proposing is.

Maybe, but do you see an alternative optimization that comes more
elegantly? I'm attacking all the different parts, and the zLOG import
comes up high in relation to other bits.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL



More information about the ZODB-Dev mailing list