re-import lsprof.py

John Arbash Meinel john at arbash-meinel.com
Sun Aug 13 02:16:20 BST 2006


Carl Friedrich Bolz wrote:
> Hi all!
> 
> The lsprof.py that is included in bzr lags quite a big behind between
> the original file. Is it possible to re-import it? It crashes because of
> things that I have in my site.py and this particular bug has been fixed
> in the official version. The newest version can be found here:
> 
> http://codespeak.net/svn/user/arigo/hack/misc/lsprof/
> 
> I also chatted a bit with Armin Rigo (one of the maintainers of lsprof)
> and it seems that lsprof.py is a deprecated interface and should be
> replaced by the use of cProfile.py, which has the same interface as the
> original python profiler. cProfile.py will also be included in
> Python2.5, so we should consider using that in bzr.  The setup.py in the
> above package installs cProfile.py, so that shouldn't be a problem
> either.
> 
> Cheers,
> 
> Carl Friedrich

The biggest problem is that the cProfile.py interface sucks compared
with the deprecated lsprof.py version. :)

The original python profiler could not generate the nicely nested call
graphs that lsprof.py can generate. And for me, there are 2 reasons to
use lsprof, it is more accurate, and it generates the nested call graph.
The second being more important than the first (for me).

Maybe I'm missing something about the cProfile.py version.

I know the version in bzrlib is actually modified itself (by David
Allouche, IIRC). It can output the same format that KCacheGrind uses,
which should have benefits for some people (this is not hooked up as an
output format for bzr, but should be).

Do you know what differences fix your site.py issues? I think we are
happy to update for any bugfixes.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060812/fc5f31ee/attachment.pgp 


More information about the bazaar mailing list