bskinn / sphobjinv

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

Consider deprecating `DataObjBytes` #216

Open bskinn opened 2 years ago

bskinn commented 2 years ago

The .as_str.as_bytes &c means that each data object is automatically a reference cycle, which might hinder performance for sufficiently large inventories, due to inefficiencies in memory management.

As well, the whole DataObjBytes concept might be a YAGNI -- a/o 3 Jan 2022, there are zero GH code hits for DataObjBytes outside of the sphobjinv codebase, while there are a handful for DataObjStr.

Will be key to do memory/speed profiling here, though, as even the largest objects.inv found to date (./tests/resource/objects_yt.inv) only has ~17500 objects. Memory itself seems a much smaller concern than any repeated-GC slowness (see #217) during inventory creation.