Timing tests in meas_extension_trailedSources in
DM-35008 show that there is a hotspot from iterating through all the records in a catalog. This is caused by python deciding to call getitem repeatedly rather than using a custom iterator.
Eli Rykoff has shown that with a simple addition of an __iter__ method for rec in catalog can run 7 times faster. We speculate that adding a pybind11 iter implementation would be even quicker (since the python is calling the _getitem_ pybind11 implementation which includes an instance check for string).