Skip to content

gpui_perf: measure what window composition costs - #54

Closed
sunli829 wants to merge 1 commit into
mainfrom
perf-composition-bench
Closed

sunli829 wants to merge 1 commit into
mainfrom
perf-composition-bench

Conversation

@sunli829

Copy link
Copy Markdown
Collaborator

Adds --composition to the showcase, which composes its window around an empty native surface as one embedding a webview does, and reports the time spent presenting each frame (LayoutStats::present_time, test-support only). With composition, presenting includes splitting the scene per surface.

This answers whether enabling window composition (as Allsum does for its webview) makes drawing slower: run the showcase with and without --composition and compare the present column.

  • fast/composition.rs times present_scene(); fast/stats.rs adds present_time and FramePhaseTimes::add_present.
  • gpui_perf showcase: --composition flag, present column in the report.
  • CONTRIBUTING.md: a "Window composition" section on how to measure it.

script/check-upstream: 0 violations. cargo test -p gpui --features test-support --lib fast:: and cargo test -p gpui_perf pass.

🤖 Generated with Claude Code

Add --composition to the showcase, which composes its window around an
empty native surface as one embedding a webview does, and report the time
spent presenting each frame (LayoutStats::present_time), which with
composition includes splitting the scene per surface.
@sunli829 sunli829 closed this Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant