Currently, the code flow when reading and batch reading pointlessly pivots back off the Python layer in the middle of the call, before calling batch_read_keys.
This is not too inefficient in the non-batch case, as batch_read_keys is parallelised. However, in batch_read, the calls to batch_read_keys are called sequentially for each symbol in the batch that is recursively normalized, and so this will be very inefficient if there are many such small symbols.
There is no conceptual need to pivot off Python mid-call, this could all be handled in the C++ layer with appropriate structures returned to Python.
Currently, the code flow when reading and batch reading pointlessly pivots back off the Python layer in the middle of the call, before calling
batch_read_keys
. This is not too inefficient in the non-batch case, asbatch_read_keys
is parallelised. However, inbatch_read
, the calls tobatch_read_keys
are called sequentially for each symbol in the batch that is recursively normalized, and so this will be very inefficient if there are many such small symbols.There is no conceptual need to pivot off Python mid-call, this could all be handled in the C++ layer with appropriate structures returned to Python.