so then tim peters tim one comcast net is all like tim my tests train on about NUMBER NUMBER msgs and a binary pickle of the database is approaching NUMBER million bytes that shrinks to under NUMBER million bytes though if i delete all the wordinfo records with spamprob exactly equal to unknown_spamprob such records aren t needed when scoring an unknown word gets a made up probability of unknown_spamprob such records are only needed for training i ve noted before that a scoring only database can be leaner that s pretty good i wonder how much better you could do by using some custom pickler i just checked my little dbm file and found a lot of what i would call bloat import anydbm hammie d hammie persistentgrahambayes ham db db anydbm open ham db db neale len db neale ccopy_reg n_reconstructor nq xNUMBER cclassifier nwordinfo nq xNUMBERc__builtin__ nobject nq xNUMBERntrq xNUMBER ga xce xbc xfd xNUMBER xbbok xNUMBERk xNUMBERk xNUMBERg xeNUMBER xNUMBER xNUMBER xNUMBER xNUMBER xNUMBER xNUMBERtb NUMBER d wordinfo neale len d wordinfo neale wordinfo NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER ignoring the fact that there are too many zeros in there the pickled version of that wordinfo object is over twice as large as the string representation so we could get a NUMBER decrease in size just by using the string representation instead of the pickle right something about that logic seems wrong to me but i can t see what it is maybe pickling is good for heterogeneous data types but every value of our big dictionary is going to have the same type so there s a ton of redundancy i guess that explains why it compressed so well neale 