Raxol. UI. Rendering. RenderBatcher
(Raxol v2.6.0)
View Source
Batches multiple render requests within animation frames to optimize performance. Coalesces rapid UI updates into single render operations.
Features
- Frame-based batching (16ms default)
- Priority-based processing
- Damage accumulation
- Adaptive batching based on complexity
Summary
Functions
Performs batch rendering of a buffer with optimizations. This is a convenience function for benchmarking.
Returns a specification to start this module under a supervisor.
Forces an immediate flush of all pending updates. Used for high-priority updates that can't wait for next frame.
Gets current batching statistics.
Updates the frame interval for adaptive batching.
Submits a render update to the batcher. Updates are accumulated until the next frame flush.
Functions
Performs batch rendering of a buffer with optimizations. This is a convenience function for benchmarking.
Returns a specification to start this module under a supervisor.
See Supervisor.
Forces an immediate flush of all pending updates. Used for high-priority updates that can't wait for next frame.
Gets current batching statistics.
@spec set_frame_interval(pos_integer(), pid() | atom()) :: :ok
Updates the frame interval for adaptive batching.
@spec submit_update( tree :: map(), diff_result :: term(), priority :: :low | :medium | :high, pid() | atom() ) :: :ok
Submits a render update to the batcher. Updates are accumulated until the next frame flush.
Uses :drop_when_full backpressure: when the batcher's
mailbox exceeds the watermark, the update is dropped and the next
non-dropped update's diff naturally subsumes it. Drops surface via
[:raxol, :runtime, :backpressure] telemetry with
label: :render_batcher_submit. The return value remains :ok
regardless of the delivery decision.