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.
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 forDataObjBytes
outside of thesphobjinv
codebase, while there are a handful forDataObjStr
.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.