When the data source is Stream the driver is currently copying the data for each image twice, which is inefficient. This is due to the class design:
- The eigerDetector class is derived (indirectly) from asynNDArrayDriver, so it has methods for creating and manipulating NDArrays.
- The streamApi class is independent of asynNDArrayDriver, so it cannot allocate or manipulate NDArrays.
- StreamApi.h defines a stream_frame structure. eigerDetector passes this structure to StreamApi when reading frames.
- StreamApi copies the data from the zmq buffer to the stream_frame structure.
- eigerDetector then copies the data from the stream_frame structure to the NDArray.
The driver needs to be restructured to avoid 2 copy operations, and the data should be copied directly from the zmq buffer to the NDArray.
When the data source is Stream the driver is currently copying the data for each image twice, which is inefficient. This is due to the class design:
The driver needs to be restructured to avoid 2 copy operations, and the data should be copied directly from the zmq buffer to the NDArray.