reuvenlax opened a new pull request, #41814: URL: https://github.com/apache/beam/pull/41814
Stacked on #41813 (`perf/windowed-values`). Avoids intermediate `WindowedValues.Builder` and lambda allocations when emitting elements through `DoFnOutputReceivers` and `OutputBuilderSuppliers`: - **`OutputBuilderSupplier` / `OutputBuilderSuppliers`**: Adds default `build`, `buildWithTimestamp`, and `buildWindowedValue` methods and implements them in `ElementOutputBuilderSupplier` by delegating directly to `WindowedValues.ofWithCurrentContext(...)` and `WindowedValues.builder(template, value)`. - **`DoFnOutputReceivers`**: Implements direct `output`, `outputWithTimestamp`, and `outputWindowedValue` methods on `WindowedContextOutputReceiver` and `RowOutputReceiver`, caches `fromRowFunction` on `RowOutputReceiver`, and removes redundant `WindowedValues.builder(...)` wrapping in `builder()`. - Updates `SplittableParDo` and `SplittableParDoNaiveBounded` to use `WindowedValues.builder(template, value)`. - Adds unit tests in `DoFnOutputReceiversTest` and `OutputBuilderSuppliersTest`, plus JMH microbenchmarks (`OutputReceiverBenchmark` and `OutputReceiverBenchmarkTest`) covering both output receivers and `FullWindowedValueCoder`. *(Replaces fork-based #41808 to use native GitHub stacked PRs.)* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
