Skip to content

[Deploy] Fast activity graph drawing#5888

Draft
mstange wants to merge 15 commits intofirefox-devtools:mainfrom
mstange:push-qlrqwlskoyom
Draft

[Deploy] Fast activity graph drawing#5888
mstange wants to merge 15 commits intofirefox-devtools:mainfrom
mstange:push-qlrqwlskoyom

Conversation

@mstange
Copy link
Copy Markdown
Contributor

@mstange mstange commented Mar 7, 2026

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

@mstange mstange force-pushed the push-qlrqwlskoyom branch 2 times, most recently from 7edd29c to 6781a87 Compare March 7, 2026 22:52
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 96.87500% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.47%. Comparing base (c886717) to head (acbfa47).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rc/components/shared/thread/ActivityGraphFills.tsx 97.52% 3 Missing ⚠️
src/profile-logic/profile-data.ts 96.82% 1 Missing and 1 partial ⚠️
src/components/flame-graph/Canvas.tsx 83.33% 1 Missing ⚠️
src/components/tooltip/CallNode.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5888      +/-   ##
==========================================
+ Coverage   85.45%   85.47%   +0.02%     
==========================================
  Files         321      322       +1     
  Lines       32139    32216      +77     
  Branches     8850     8883      +33     
==========================================
+ Hits        27463    27538      +75     
- Misses       4241     4242       +1     
- Partials      435      436       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mstange mstange force-pushed the push-qlrqwlskoyom branch 2 times, most recently from 7ae0cc9 to 6a88829 Compare March 9, 2026 15:02
@mstange mstange force-pushed the push-qlrqwlskoyom branch 2 times, most recently from bc99e64 to 3672882 Compare March 19, 2026 01:04
mstange added 15 commits April 2, 2026 11:55
…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.
@mstange mstange force-pushed the push-qlrqwlskoyom branch from 3672882 to acbfa47 Compare April 2, 2026 15:56
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