[Zope-dev] Call Profiler

seb bacon seb@jamkit.com
01 Feb 2002 10:53:11 +0000


> I've just announced our Call Profiler product on zope.org and the zope 
> announce list (waiting for people in different timezones to authorise them :)
>   ( http://www.zope.org/Members/richard/CallProfiler/  for the impatient)

This is absolutely excellent, well done and thanks :)  I added various FSObjects to the profiled modules list and have been looking at my CMF systems - it's really instructive.

> It does pose a question though: would it be better to have support for this 
> stuff in the core, or is it OK for a product like this to dynamically patch 
> the call methods when it needs to?

I see nothing wrong with it being a monkeypatch product.  On the other
hand, it is a very useful tool, and as such could benefit from being in
the core simply so that it always gets maintained with the core.

> On one hand, the performance hit when dynamically patching the methods is 
> zero when the product is not "active", but it does mean diddling with methods 
> that really probably should be left alone. On the other hand, having changes 
> to the core code to test for profiling being enabled introduces a small 
> performance hit even when profiling is not activated.

You could do this check only if zope is being run in debug mode; then
there would be zero perormance hit in production sites.

> 
> Any comments?
> 

I think the reporting could do with some usability improvements.  It's
good now, but takes a while to navigate round.  

- All the reports could benefit from being sortable by column.  
- the trace for a complete template could be slightly clearer.  The
colour coding for the start and end of a module could have a clear
legend, for example.
- there needs to be some solution for really long URLs, which require
lots of horizontal scrolling - just displaying the final parts of the
path, with the rest of the url hidden somehow?

I can't think of exactly what else I would do to improve it right now,
though.  And that's the kind of change I never get round to bothering
with, personally... Sorry these aren't really constructive ideas, but
you did ask for feedback :-)

seb