grpc-device icon indicating copy to clipboard operation
grpc-device copied to clipboard

Code generation could be more efficient for simple 'repeated' types

Open dmondrik opened this issue 1 year ago • 0 comments

In many cases a vector is declared on the stack and the data is copied unnecessarily. Examples:

  • The input int32 array of values in NiRFmxInstrService::SetAttributeI32Array
  • The output float64 array stateVector in NiDAQmxService::GetAnalogPowerUpStates

In at least some cases like this, we should be able to generate code that efficiently:

  • For input, gets the pointer to the request buffer's data()
  • For output, gets the mutable data and reserves the appropriate size.

AB#2545490

dmondrik avatar Oct 09 '23 15:10 dmondrik