[Python-Dev] Hotshot

Skip Montanaro skip at pobox.com
Mon Jan 26 17:42:22 EST 2004

    >> The biggest problem I had with hotshot is the filesize.

    Tim> In my coverage tool (which I *still* haven't managed to get
    Tim> permission to release!!!) I was storing arrays of file numbers
    Tim> (indexes into a list), line numbers (into the file) and type (line,
    Tim> exception, etc). Every thousand or so entries, I would take the
    Tim> arrays, to a `tostring()` then compress the string. Then the 3 sets
    Tim> of data was written to file as a binary pickle.

It seems to me it might be simpler to just write the profile file through
the gzip module and teach the hotshot.stats.load() function to recognize
such files and uncompress accordingly.


More information about the Python-Dev mailing list