Skip to content

Driver is copying data twice for each frame in Stream mode, not efficient #68

@MarkRivers

Description

@MarkRivers

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions