Description
At present, reflectx.CallNoPanic is invoked for every element, and adds recovery defers for each element. Defers are cheap, but not "per element" cheap. In a simple pipeline (a single ParDo), this represents around ~3% overhead for the pipeline, which is aggravated for every pardo layer.
Since the beam model's unit of re-triable computation is per bundle, the recovery defers should be invoked per bundle only at the root. This is already being done in exec/plan.go
This could be as simple as calling Call directly in exec/fn.go instead of with the reflectx wrapper as it is presently.
Attachments
Issue Links
- links to