-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Durus objects, when in RAM, could keep the object size in a (volatile, not stored in disk) attribute. This attribute can be generated when loading the pickle from disk (you directly have the size), or when storing the object in the disk (you have to create the pickle, so you have the size too). In fact, this size bookkeeping could be managed in a separate internal dictionary, don't have to be inside the object. I have objects of very dissimilar sizes in my storage, so current cache control (that is, object count) is not representative of actual memory usage. I have objects 50 bytes long, and 60Kbytes long :-(. I would suggest to change the cache code to control cache size, instead of object count. Comments?. PS: I could consider patching this myself, if durus developers are interested but not spare time. - -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea@jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:jcea@jabber.org _/_/ _/_/ _/_/_/_/_/ .. _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBTJzmcJlgi5GaxT1NAQJ3GAP/Q8SO/gktF/F2cY9FttnJK/6hekfVAQxF ZCspE3wWrh1B+zLDl5nW3ZjocTgyljXuaustZyzSbVouRFgPM8YMPrMp9eB6OVeA GY/D8D7hQoWjImCm+sJfAX7XNTsBb/OKKmfMdV+pzX21E21ZfURRZDm2hsJtizq7 EOGU4ryQZ0A= =Tev4 -----END PGP SIGNATURE-----