relstorage.treemark – OID tree traversal for the garbage collection phase of packing¶
OID tree traversal for the garbage collection phase of packing.
Optimized for memory efficiency. Uses sets of native integers rather than Python integers because native integers take up a lot less room in RAM.
Finds all OIDs reachable from a set of root OIDs.
Add a list of (from_oid, to_oid) reference pairs.
from_oid and to_oid must be 64 bit integers.
Free the collection of refs to save RAM.
Mark specific OIDs and descendants of those OIDs as reachable.
Iterate over all the reachable OIDs.
D.items() -> a set-like object providing a view on D’s items