Details
-
Type:
Improvement
-
Status: Invalid
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: afw
-
Labels:
-
Story Points:2
Description
Currently, to add multiple new empty records to a sourceCatalog requires multiple calls to catalog.addNew(), which can result in the catalog being non-contiguous in memory. It would be much better to have an catalog.addNew(size_t N) method that creates N new elements at once, all contiguous.
Whether this is best done via an overload of addNew or a new method, I leave to the implementer.
Workaround:
catalog.reserve(num)
for ii in range(num):
catalog.addNew()