perf(iced): reduce iced layer submit cost when UI draw is idle #1079

Closed
opened 2026-11-07 03:28:22 +00:00 by SakulFlee · 1 comment
Owner

Summary

On Windows, the iced/debug overlay costs roughly the same as the scene submission:

  • overlay_layers: ~1.69 ms mean, up to 3.67 ms
  • iced_draw: ~0.82 ms
  • iced_submit: ~0.86 ms
  • scene_submit: ~1.72 ms

Together they are about 85% of the 4.02 ms render total.

When iced_draw drops to ~0.09 ms (rows 88-92), iced_submit remains ~0.73-0.81 ms. So even an apparently idle or hidden iced layer still costs ~0.8 ms CPU.

Investigation

  • Skip the iced layer submit when there are no visible panels or no new UI frame.
  • Reuse the cached iced texture instead of resubmitting it.
  • Merge the iced command buffer into the main scene encoder if the fork permits it.
  • Compare Windows/Linux and different DPI/window sizes.

Acceptance criteria

  • An idle or hidden iced layer costs near zero.
  • Visible UI cost is measured and documented.
  • No visual regressions in the debug panels.
## Summary On Windows, the iced/debug overlay costs roughly the same as the scene submission: - `overlay_layers`: ~1.69 ms mean, up to 3.67 ms - `iced_draw`: ~0.82 ms - `iced_submit`: ~0.86 ms - `scene_submit`: ~1.72 ms Together they are about 85% of the 4.02 ms render total. When `iced_draw` drops to ~0.09 ms (rows 88-92), `iced_submit` remains ~0.73-0.81 ms. So even an apparently idle or hidden iced layer still costs ~0.8 ms CPU. ## Investigation - Skip the iced layer submit when there are no visible panels or no new UI frame. - Reuse the cached iced texture instead of resubmitting it. - Merge the iced command buffer into the main scene encoder if the fork permits it. - Compare Windows/Linux and different DPI/window sizes. ## Acceptance criteria - An idle or hidden iced layer costs near zero. - Visible UI cost is measured and documented. - No visual regressions in the debug panels.
Author
Owner

The Android minimal capture shows this is larger than the idle-submit case:

  • Debug UI hidden: iced_draw ~0.05 ms, iced_submit ~0.96 ms.
  • Debug UI open: iced_draw ~10.4 ms, iced_submit ~4.8 ms, ui_events ~5.4 ms.
  • FPS drops from the 60 FPS vsync cap to ~40 FPS.
  • The scene GPU time is only ~0.12 ms and present is under 1 ms.

So active panel drawing and event processing are also major costs, not just an idle layer submit. The tabbed single-panel mobile layout in #1082 should reduce the number of visible panels; this issue should probably cover both active draw and idle submit.

The Android minimal capture shows this is larger than the idle-submit case: - Debug UI hidden: `iced_draw` ~0.05 ms, `iced_submit` ~0.96 ms. - Debug UI open: `iced_draw` ~10.4 ms, `iced_submit` ~4.8 ms, `ui_events` ~5.4 ms. - FPS drops from the 60 FPS vsync cap to ~40 FPS. - The scene GPU time is only ~0.12 ms and `present` is under 1 ms. So active panel drawing and event processing are also major costs, not just an idle layer submit. The tabbed single-panel mobile layout in #1082 should reduce the number of visible panels; this issue should probably cover both active draw and idle submit.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SakulFlee/Orbital#1079
No description provided.