bskinn / sphobjinv

Toolkit for manipulation and inspection of Sphinx objects.inv files
https://sphobjinv.readthedocs.io
MIT License
78 stars 9 forks source link

Alter GC settings to speed up `Inventory` loads? #217

Open bskinn opened 2 years ago

bskinn commented 2 years ago

Per Python Bytes Episode 264, GC gets triggered after 700 non-transient memory allocations.

Thus, given that each, e.g., DataObjStr object has a reference cycle within itself (dos.as_bytes.as_str), every ~350 items in an objects.inv will trigger a GC, which is likely useless since the Inventory will want all of those objects in a durable fashion.

Performance details may change if #216 happens.