This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author prinsherbert
Recipients prinsherbert
Date 2015-10-23.09:37:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1445593043.5.0.334623277706.issue25465@psf.upfronthosting.co.za>
In-reply-to
Content
I very often want to use pickle to store huge objects, such that I do not need to recalculate them again.

However, I noticed that pickle uses O(n) (for n the object size in memory) amount of memory. That is, using python 3:

    data = {'%06d' % i: i for i in range(30 * 1000 ** 2)}
    # data consumes a lot of my 8GB ram
    import pickle
    with open('dict-database.p3', 'wb') as f: pickle.dump(data, f)
    # I have to kill the process, in order to not overflow in memory. If I don't, the OS crashes. IMHO the OS should never crash due to python.

I don't think pickle should require a O(n) memory overhead.
History
Date User Action Args
2015-10-23 09:37:23prinsherbertsetrecipients: + prinsherbert
2015-10-23 09:37:23prinsherbertsetmessageid: <1445593043.5.0.334623277706.issue25465@psf.upfronthosting.co.za>
2015-10-23 09:37:23prinsherbertlinkissue25465 messages
2015-10-23 09:37:22prinsherbertcreate