On 10/12/06, David Bingerwrote: > This seems llike a Python issue more than a Durus one. That occurred to me after I sent the message. I've been looking over the Durus source, and the only amount of data it seems to add are four little attributes in PersistentBase. > I wonder, though, if you could save a lot of RAM by > using intern() calls in a __setstate__() implementation. > If you are using the names as keys in a BTree, there > is another copy there, too, and there might be another > chance to use intern() for some advantage. The keys are actually ints. I looked at intern() yesterday in the Python docs but for the purpose of making sure duplicate names were the same object. I thought that was one of intern's features but it's not mentioned in the docs. It says intern() just possibly increases speed with dictionary lookups... but then it says all keys and attribute names are automatically intern'ed anyway. So if BTree isn't doing this too, maybe it should. At one point I had an extra set or dictionary of names to pass all imported names through, to guarantee that duplicates would be shared, but I eliminated it because it didn't seem to make a difference. -- Mike Orr