When traversing the object graph, use less RAM. BTree Sets, TreeSets, and Buckets are much more efficient with RAM than native Python sets. Probably faster too.
Added a script that creates and packs and big database.