reuvenlax opened a new pull request, #41807:
URL: https://github.com/apache/beam/pull/41807

   Depends on the WindowedValues fast-paths PR (pr/41803).
   
   Eliminates per-element builder, lambda, iterator, and Instant allocations in 
FnApiDoFnRunner:
   
   Fast-paths single-window elements in processElementForWindowObservingParDo 
using WindowedValues.singleWindowOrNull(), avoiding getWindows().iterator() 
allocation.
   Implements direct output, outputWithTimestamp, and outputWindowedValue 
methods on ProcessBundleContextBase, OnWindowExpirationContext, OnTimerContext, 
row receivers, and tagged receivers using 
WindowedValues.ofWithCurrentContext(...) and 
WindowedValues.builder(currentElement, value).
   Pre-resolves FnDataReceiver once per TupleTag when creating tagged receivers 
and replaces computeIfAbsent(tag, this::...) with get/put to avoid 
capturing-lambda allocations on cache hits.
   Uses primitive long arithmetic in a unified checkOutputTimestamp helper for 
element, timer, and window-expiration outputs, and uses 
currentTimer.causedByDrain() consistently in OnTimerContext.
   Adds unit tests in FnApiDoFnRunnerTest covering 
row/tagged/timer/window-expiration/non-window-observing fast paths and 
unknown-tag handling.


-- 
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]

Reply via email to