The C-accelerated mmCIF reader calls a user-provided callback function to process all data in the mmCIF file. For simple categories, this is called once at the end of the file once all keywords for that category have been encountered. For loop constructs, it is called once per line in the loop. This can be quite inefficient since that could be a lot of function calls per loop (which can't be optimized as the function is only known at runtime).
A faster solution would be to have a single callback per loop, and provide an API function to get the next line.
The C-accelerated mmCIF reader calls a user-provided callback function to process all data in the mmCIF file. For simple categories, this is called once at the end of the file once all keywords for that category have been encountered. For loop constructs, it is called once per line in the loop. This can be quite inefficient since that could be a lot of function calls per loop (which can't be optimized as the function is only known at runtime).
A faster solution would be to have a single callback per loop, and provide an API function to get the next line.