[Deploy] Fast activity graph drawing#5888
Draft
mstange wants to merge 23 commits intofirefox-devtools:mainfrom
Draft
[Deploy] Fast activity graph drawing#5888mstange wants to merge 23 commits intofirefox-devtools:mainfrom
mstange wants to merge 23 commits intofirefox-devtools:mainfrom
Conversation
7edd29c to
6781a87
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5888 +/- ##
==========================================
+ Coverage 85.41% 85.43% +0.02%
==========================================
Files 321 322 +1
Lines 32140 32187 +47
Branches 8757 8764 +7
==========================================
+ Hits 27451 27498 +47
+ Misses 4257 4256 -1
- Partials 432 433 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6781a87 to
7ae0cc9
Compare
…les" to "sample").
This turns it into a Uint8Array of integer percentages, which requires less memory bandwidth when rendering the activity graph. We now always have a fallback threadCPUPercent array, even if the original profile doesn't contain any threadCPUDelta information. The synthesized values are set to 100%. We also have a trailing extra value in order to simplify the rendering code for the last sample.
The UI for switching the activity graph type isn't visible by default and nobody has complained about its absence. I think there's still a way to use the URL to ask for an activity graph that doesn't take CPU usage into account, but we can just start ignoring that URL parameter. This simplifies the code.
Nothing was passing null here.
…ndex. Handle it during display instead.
…dSelf" and "TotalButNotSelf" states. This will let us share work between the activity graph and the sidebar, see the next commit. There's unfortunately a bit of the clash between the variable names and the types now. Should we rename sampleSelectedStates to sampleRelationsToSelectedNode everywhere? It sounds a bit clunky.
Sadly this gives a big performance boost in Firefox.
…ons. When computing the activity graph fills, store the fractional sample positions as integers after multipyling by (1 << FIXED_PREC_BITS). This lets us use shifts and masking when we accumulate the contributions into the buffers in the hot loops.
7ae0cc9 to
6a88829
Compare
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.
Production | Deploy preview
On my machine, when I press and hold the up/down keys on this profile, these changes reduce the time of each keydown event from 130ms to 23ms (~6x faster). https://share.firefox.dev/4d8gja7