Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20203

Re: log and figure out what bits are slow and optimize them.

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: log and figure out what bits are slow and optimize them.
Date 2012-02-10 23:06 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <jh47uc$jfr$1@reader1.panix.com> (permalink)
References <a07666f2-a18b-4bf5-bbdc-8d7f74db09be@q8g2000pbb.googlegroups.com> <mailman.5654.1328877518.27778.python-list@python.org> <b0e0058a-9322-45a2-8707-c927e14ec714@u4g2000pbg.googlegroups.com> <mailman.5685.1328913452.27778.python-list@python.org>

Show all headers | View raw


In <mailman.5685.1328913452.27778.python-list@python.org> Kev Dwyer <kevin.p.dwyer@gmail.com> writes:

> *Any* instrumentation code is going to affect performance.

Funny story about that...

I wanted to profile some code of mine, and a colleague recommended the
'hotshot' module.

It's pretty easy to use: there are functions to start profiling, stop
profiling and print results.

So I added the function calls and ran my code.... and it took a really
long time.  I mean a REALLY long time.  In fact I eventually had to kill
the process.

I briefly wondered if my coworker was playing a prank on me... then I
realized that I had neglected to call the function to stop profiling!

So when I went to print the results, it was still profiling... endlessly.

(Okay, maybe it wasn't that funny.)

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

log and figure out what bits are slow and optimize them. sajuptpm <sajuptpm@gmail.com> - 2012-02-10 04:30 -0800
  Re: log and figure out what bits are slow and optimize them. Arnaud Delobelle <arnodel@gmail.com> - 2012-02-10 12:38 +0000
    Re: log and figure out what bits are slow and optimize them. sajuptpm <sajuptpm@gmail.com> - 2012-02-10 04:56 -0800
      Re: log and figure out what bits are slow and optimize them. Kev Dwyer <kevin.p.dwyer@gmail.com> - 2012-02-10 22:37 +0000
        Re: log and figure out what bits are slow and optimize them. John Gordon <gordon@panix.com> - 2012-02-10 23:06 +0000
          Re: log and figure out what bits are slow and optimize them. sajuptpm <sajuptpm@gmail.com> - 2012-02-10 23:53 -0800
  Re: log and figure out what bits are slow and optimize them. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-02-10 14:25 +0000

csiph-web