Repository navigation
Agent: draw gpui's frame times with MAPLE_FRAME_STATS - #1572
Closed
AnthonyRonning wants to merge 1 commit into
Closed
AnthonyRonning wants to merge 1 commit into
AnthonyRonning wants to merge 1 commit into
Conversation
The newer gpui can paint how long each frame took to build and paint over the window. Turn its profiler on, as Zed does, and show that overlay in the main window when MAPLE_FRAME_STATS is set; `full` adds percentiles over the last 1000 frames. The performance check gains a step that uses it, so "smooth" can be a number. One new registry dependency, hdrhistogram 7.5.4, the version in Zed's lockfile, published well over seven days ago. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
Folded into #1571, so the gpui bump and the one thing adopted from it (the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second PR of the stack, on top of the gpui bump. Having read through what changed upstream, most of the benefit arrives with the bump itself; this is the one change to our own code worth making on master right away. The rest of what the newer gpui enables (springs, one clock for animation tests, real fades over cached views) belongs with the motion work above this.
What it adds
MAPLE_FRAME_STATS=1makes gpui draw how long each frame took to build and paint in a corner of the main window.MAPLE_FRAME_STATS=fulladds percentiles over the last 1000 frames. It works in any build, so it can be read on a packaged build in a VM as well as a local one.The overlay comes from gpui's
profilerfeature, which this turns on. Zed ships with it on. gpui paints the overlay straight into the scene, so showing it asks for no extra frames.docs/performance-check.mdgains a step that uses it, so the streaming check can record a number instead of "Smooth".Why now
The motion work turns single-frame state changes into runs of frames, and each of those frames re-renders the chat view. This gives us a way to see what that costs on each platform before deciding anything by feel alone.
Dependencies
One new registry dependency:
hdrhistogram7.5.4, the version in Zed's lockfile, published well over seven days ago.Not in this PR
Validation
The repository pre-commit hook passed on this head (fmt, clippy on all four feature sets, the app test suite). The overlay itself has not been looked at in a running app.
🤖 Generated with Claude Code