Help: sizeof() and reference in python?

Toby Dickenson mbel44 at dial.pipex.net
Wed Mar 8 04:32:32 EST 2000


"Gene Chiaramonte" <gchiaramonte at ibl.bm> wrote:

>When working with large datasets, I need to monitor memory usage, so I can
>warn a user about impending doom before it happens and they call me
>screaming that my program sucks. Thus, I can tell them they suck first.

Would it be reasonable to measure the size of the data set by pickling
it, and measuring the size of the pickle? You don't have to store the
whole pickle in memory if you create a new file-like object that
simply counts how many bytes have been written to it without recording
those bytes.

Toby Dickenson
tdickenson at geminidataloggers.com



More information about the Python-list mailing list