Extracting results from a large hotshot profile

B

Brian Cole

I'm profiling some code that screens a large database. The algorithm
efficiency is heavily variable, based upon the different records in
the database. In order to get a sense of the best place to start
optimizing the code I did a hotshot profile. To make this profile took
about a day. However, I've been trying to extract results from the
profile for the past two days. It's eating up all the memory (2G
memory) on the machine and is slowing sucking up the swap space
(another 2G).

I'm hesitant to kill it for I might get results out of it some day
(even if I may have to bequeath them to my grand-children), but is
there a better way to do this?

I'm using the following script to print my results:
import sys
import hotshot.stats
stats = hotshot.stats.load(sys.argv[1])
stats.strip_dirs()
stats.sort_stats('time', 'calls')
stats.print_stats(20)

The profile is 355 MB large. Is there anything I can do to extract that data?

Thanks in advance,
Brian Cole
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top