Skip to content

Deduplicate the frameTable during compaction#6017

Open
mstange wants to merge 2 commits into
firefox-devtools:mainfrom
mstange:dedup-frametable
Open

Deduplicate the frameTable during compaction#6017
mstange wants to merge 2 commits into
firefox-devtools:mainfrom
mstange:dedup-frametable

Conversation

@mstange

@mstange mstange commented May 11, 2026

Copy link
Copy Markdown
Contributor

Main branch | Deploy preview


When we combine the per-thread frame tables from the gecko profile format into the shared frame table of the processed format, we don't do any deduplication, because deduplicating would slow down loading. But we could do it during profile compacting (after sanitization) instead. This will also make it work for profiles captured from older samply versions, or when re-uploading old shared profiles.

In the profiles linked above, if I re-upload with the "Screenshots" checkbox unchecked (so that sanitization runs profile compacting), I get the following numbers:

  • Without frame table deduplication: 52.1 MB compressed, 370.4 MB uncompressed, 224210 frames
  • With frame table deduplication: 51.6 MB compressed, 365.7 MB uncompressed, 132059 frames

This PR doesn't implement stack table deduplication; I expect some more savings from that, but it needs frame table deduplication first. Edit: Implemented in #6137, doesn't actually save much.

@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.10345% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.52%. Comparing base (2880a96) to head (9c0b46f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/profile-compacting.ts 93.10% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6017      +/-   ##
==========================================
+ Coverage   83.50%   83.52%   +0.01%     
==========================================
  Files         342      342              
  Lines       36183    36261      +78     
  Branches    10133    10141       +8     
==========================================
+ Hits        30216    30288      +72     
- Misses       5539     5545       +6     
  Partials      428      428              

☔ 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 dedup-frametable branch 3 times, most recently from 68942f5 to f971d3f Compare May 12, 2026 15:34
@mstange mstange force-pushed the dedup-frametable branch from f971d3f to a7a1d4c Compare July 3, 2026 13:12
@mstange mstange force-pushed the dedup-frametable branch 2 times, most recently from 607ffd5 to 31fb186 Compare July 3, 2026 13:19
@mstange mstange force-pushed the dedup-frametable branch from 31fb186 to 9c0b46f Compare July 3, 2026 13:23
@mstange mstange marked this pull request as ready for review July 3, 2026 15:21
@mstange mstange requested a review from canova July 3, 2026 15:21
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