Skip to content

[Deploy] Fast activity graph drawing - #5888

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

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

Conversation

@mstange

@mstange mstange commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Mar 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.77778% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.69%. Comparing base (342d130) to head (1082e5b).
⚠️ 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 ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5888      +/-   ##
==========================================
+ Coverage   83.65%   83.69%   +0.03%     
==========================================
  Files         348      349       +1     
  Lines       37339    37416      +77     
  Branches    10376    10500     +124     
==========================================
+ Hits        31237    31314      +77     
+ Misses       5674     5673       -1     
- Partials      428      429       +1     

☔ View full report in Codecov by Harness.
📢 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
mstange force-pushed the push-qlrqwlskoyom branch from acbfa47 to 5f9873b Compare April 11, 2026 16:18
@mstange
mstange force-pushed the push-qlrqwlskoyom branch from 5f9873b to 857bb1e Compare July 28, 2026 18:38
mstange added 4 commits July 28, 2026 14:42
…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.
Rename getSampleIndexToNonInvertedCallNodeIndexForFilteredThread to
getSampleCallNodesForFilteredThread, and add
getPreviewFilteredCtssSampleCallNodes / getPreviewFilteredCtssSampleSelectedStates
so that the sidebar timings no longer have to recompute the selected states.

The two profile-query call sites that computed a CallNodeSelfAndSummary now use
getPreviewFilteredCtssSampleCallNodes rather than the filtered-thread array,
since they index it with getPreviewFilteredCtssSamples. The two are only
interchangeable while the summary strategy is 'timing' and there is no preview
selection, which is true for every profile-query caller today, so this does not
change any output.
@mstange
mstange force-pushed the push-qlrqwlskoyom branch from 857bb1e to 0cb2a80 Compare July 28, 2026 18:54
@mstange
mstange force-pushed the push-qlrqwlskoyom branch from 0cb2a80 to 1082e5b Compare July 28, 2026 20:26
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