Repository navigation
Conversation
|
Someone is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
f153054 to
d38ae1d
Compare
|
@greptileai review |
|
Thanks for this! The same per-frame reuse landed on main in 164bfef ( |
|
Opened #2739 with just that test on main's cache @richiemcilroy |
|
Thanks so much for this contribution, @notkainoa! The same per-frame shaped-text reuse landed on main in 164bfef, so this one is covered. Closing this one, but really appreciate the time you put into it. |
Text overlays are 6.7–8.2x cheaper per frame. The text layer reshaped every overlay from scratch on every frame, even when the text hadn't changed. Now it reuses last frame's layout.
Runs on every frame of GPUI editor playback, scrubbing and export.
What changed
Output is unchanged
mainwith perf(rendering): reuse shaped text overlay layouts between frames (6.7-8.2x faster) #2524, perf(rendering): reshape the keyboard overlay only when its text changes (2.8x faster) #2525 and perf(rendering): reshape captions only when their text or style changes (up to 7.6x faster) #2526 applied together. Covers all 14 text animations, text styles, mid-playback edits, keyboard and caption styles, playback, backward scrubbing, random seeks, pauses and resizes. A planted cache-key bug makes thousands of frames differ, so the check catches mistakes.cargo test -p cap-rendering --release --lib: 305 passed on currentmain. The GPU tests pass with--include-ignored.cargo clippy -p cap-rendering --all-targets -- -D warningsandcargo fmtare clean.Benchmark setup
TextLayer::prepareat 1920×1080. p50 over 300 frames after 30 warmup frames. Each number is the median of 3 runs. Apple M1, release build, opt-level 3. "Before" is the same benchmark onmain(3d19c5c).CARGO_PROFILE_RELEASE_OPT_LEVEL=3 cargo test -p cap-rendering --release --lib benchmark_text_layer_prepare -- --ignored --nocapture

Confidence Score: 5/5
The PR appears safe to merge; no blocking issue was found.Summary
TextLayernow reuses the previous frame’s plain text layouts when all shaping inputs match.No new actionable issues found. GPU tests were inspected but not run.
Reviews (2) · Last reviewed commit: "test(rendering): check the text layout c..." · Reviewed by Greptile