I have a gzip’d pickled file that is 4mb in size. Each time I open the file and load it the time it takes to unpickle takes longer. The contents of the file never change and the size stays the same.
Test Times:
1st Run: 27.5s
2nd Run: 44.1s
3rd Run: 52.7s
The code I’m using is as follows:
f = gzip.open( filepath, "rb" )
pickleFile = cPickle.Unpickler( f )
paData = pickleFile.load()
f.close()
Any idea why it is taking longer to load each time I run?
I created two test pickle file 3MBs and 22MBs, and zipped it.
I don’t understand what you are doing because I just did a test and this code:
Always prints out the same as I run it.
3 MB File:
22MB File: