Implement the "collapse resource" transform with the help of the "collapse direct recursion" transform.#5824
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5824 +/- ##
=======================================
Coverage 85.56% 85.56%
=======================================
Files 319 319
Lines 31420 31499 +79
Branches 8661 8705 +44
=======================================
+ Hits 26885 26953 +68
- Misses 4104 4115 +11
Partials 431 431 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
canova
left a comment
There was a problem hiding this comment.
Looks good to me, thanks!
The new behavior does indeed look better to me.
It's a bit unfortunate that we might break the old urls, but like you said, it's pretty rare.
| * | | / \ | ||
| * v v v v | ||
| * C.js I.js E.js I.js | ||
| * | | | ||
| * v v | ||
| * D.cpp:firefox F.cpp | ||
| * | | | ||
| * v v |
There was a problem hiding this comment.
Oh, yeah the new behavior looks more like what I would expect too.
| newStackTable, | ||
| getMapStackUpdater(oldStackToNewStack) | ||
| ); | ||
| return collapseDirectRecursion(newThread, collapsedFuncIndex, implementation); |
There was a problem hiding this comment.
Ni: It would be nice to explain the new approach in a function comment of collapseResource. It might be a bit surprising to read that it uses the collapse recursion now.
…lapse direct recursion" transform. This simplifies the code considerably. There is a slight behavior change in the case where there's an implementation filter, see the change to the test. I think the new behavior makes more sense, and it is consistent with the existing behavior of the collapse-direct-resource transform. I'm not worried about breaking URLs because the collapse resource transform is only very rarely used, and the combination with an implementation filter is probably even rarer. This change also simplifies the creation of the new frame table: We don't need to add any new frames, we can just swap out the func on all existing frames whose original func is from the collapsed resource.
bcbdda9 to
806adbc
Compare
Changes: [fatadel] Fix crash when nativeSymbol index is out of bounds in assembly view (#5850) [depfu[bot]] Update all Yarn dependencies (2026-02-25) (#5859) [Nazım Can Altınova] Fix the color of dark mode back arrow svg (#5863) [fatadel] Force canvas redraw when system theme changes (#5861) [Nazım Can Altınova] Fix unhandled promise rejection in setupInitialUrlState (#5864) [fatadel] Persist selected marker in URL and show sticky tooltip on load (#5847) [Markus Stange] Implement the "collapse resource" transform with the help of the "collapse direct recursion" transform. (#5824) [Markus Stange] Bump rollup from 2.79.2 to 2.80.0 (#5868) [Markus Stange] Remove async attribute from module script tag. (#5870) [Nazım Can Altınova] Update the docsify package that's used in the user documentation (#5872) [Markus Stange] Share stackTable, frameTable, funcTable, resourceTable and nativeSymbols between threads (#5482) [Nazım Can Altınova] Escape CSS URLs that are coming from profiles (#5874) [fatadel] Update home page message for the other browser case (#5866) [fatadel] Add support for ternaries in marker labels (#5857) [Markus Stange] Reduce allocations for getStackLineInfo + getStackAddressInfo (#5761) And special thanks to our localizers: de: Ger fy-NL: Fjoerfoks it: Francesco Lodolo [:flod] nl: Fjoerfoks ru: berry ru: Valery Ledovskoy zh-TW: Pin-guang Chen
This simplifies the code considerably.
There is a slight behavior change in the case where there's an implementation filter, see the change to the test. I think the new behavior makes more sense, and it is consistent with the existing behavior of the collapse-direct-resource transform.
I'm not worried about breaking URLs because the collapse resource transform is only very rarely used, and the combination with an implementation filter is probably even rarer.
This change also simplifies the creation of the new frame table: We don't need to add any new frames, we can just swap out the func on all existing frames whose original func is from the collapsed resource.