Skip to content

[Deploy] Fast activity graph drawing#5888

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

[Deploy] Fast activity graph drawing#5888
mstange wants to merge 14 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.41%. Comparing base (e17e396) to head (5f9873b).
⚠️ 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.38%   85.41%   +0.02%     
==========================================
  Files         322      323       +1     
  Lines       32101    32178      +77     
  Branches     8849     8866      +17     
==========================================
+ Hits        27410    27485      +75     
- Misses       4260     4261       +1     
- Partials      431      432       +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 mstange force-pushed the push-qlrqwlskoyom branch from 3672882 to acbfa47 Compare April 2, 2026 15:56
mstange added 14 commits April 11, 2026 12:07
…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 acbfa47 to 5f9873b Compare April 11, 2026 16:18
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