Skip to content

Commit

Permalink
DPL: fix performance regression when using output proxy
Browse files Browse the repository at this point in the history
Enabling the early forwarding for any output proxy was actually
a bad idea. The early forwarding triggers a Copy, which has a much
larger overhead, even in the case it's shallow.

This makes sure that the original behavior is back: early forwarding
is never enabled for the last device in the chain.
  • Loading branch information
ktf authored and davidrohr committed Aug 29, 2023
1 parent 68ea15c commit c975e59
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Framework/Core/src/DataProcessingDevice.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1070,11 +1070,6 @@ void DataProcessingDevice::fillContext(DataProcessorContext& context, DeviceCont
}

auto decideEarlyForward = [&context, &spec, this]() -> bool {
// There is nothing produced by this device, so we can forward early
// because this is a proxy.
if (spec.forwards.empty() == false && spec.outputs.empty() == true) {
return true;
}
/// We must make sure there is no optional
/// if we want to optimize the forwarding
bool canForwardEarly = (spec.forwards.empty() == false) && mProcessingPolicies.earlyForward != EarlyForwardPolicy::NEVER;
Expand Down

0 comments on commit c975e59

Please sign in to comment.