Remove some code that uses the preview filtered thread#5336
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5336 +/- ##
==========================================
- Coverage 86.08% 86.07% -0.02%
==========================================
Files 311 311
Lines 29687 29645 -42
Branches 8192 8194 +2
==========================================
- Hits 25557 25516 -41
+ Misses 3548 3547 -1
Partials 582 582 ☔ View full report in Codecov by Sentry. |
julienw
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me.
Only commit Remove getFilteredCallNodeMaxDepthPlusOne I'm not so sure. Tell me what you think!
| } = this.props; | ||
|
|
||
| const maxViewportHeight = maxStackDepthPlusOne * STACK_FRAME_HEIGHT; | ||
| const maxViewportHeight = combinedTimingRows.length * STACK_FRAME_HEIGHT; |
There was a problem hiding this comment.
indeed, I just checked that we were clipping off some rows when showing user timing marker rows
| // selections. | ||
| callNodeMaxDepthPlusOne: | ||
| selectedThreadSelectors.getFilteredCallNodeMaxDepthPlusOne(state), | ||
| selectedThreadSelectors.getCallNodeMaxDepthPlusOne(state), |
There was a problem hiding this comment.
I'm not sure of the changes in this commit (Remove getFilteredCallNodeMaxDepthPlusOne. ).
- It's not a commit that removes code that uses the preview filtered thread.
- in some situations it makes it possible to scroll down in the stack chart or up in the flame graph in the white space. We could already do that before with a preview selection but not with a committed range.
I could live with but wanted to ask your opinion before that, to know if this was expected by you.
See for example:
production / deploy preview
(also try the stack chart with these links)
There was a problem hiding this comment.
Good catch. This behavior difference was expected by me but I your example is somewhat convincing that the new behavior is worse. I'll just remove this commit.
Thanks for doing the work to find an example!
Hopefully nobody was relying on the fact that the sample data in window.filteredThread was taking the preview selection into account.
I think we were clipping off some rows if there were user timing marker rows.
…thread. CallTree doesn't look at the samples table of the thread, it just looks at funcTable / resourceTable / stringTable etc. For sample data, we pass the CTSS samples to it separately. So it's fine to pass the filtered thread to the CallTree.
eda833f to
3c90f66
Compare
Updates: [Julien Wajsberg] Some more small refactorings (#5320) [Markus Stange] Pass the correct sample index offset to getTimingsForCallNodeIndex for the flame graph tooltip. (#5328) [Nisarg Jhaveri] Update docs to include Android Studio/Simpleperf trace file support (#5309) [Markus Stange] Don't pass the preview filtered thread to getTimingsForPath/CallNodeIndex. (#5329) [Nazım Can Altınova] Add a "Sample timestamp" field to the sample tooltip in timeline (#5322) [Markus Stange] Reduce confusion between call tree summary strategy aware samples and regular samples (#5330) [Markus Stange] Rename this getCounter selector to getCounters. (#5337) [Markus Stange] Make sample indexes compatible between the unfiltered and (preview) filtered call tree summary strategy samples when using an allocation strat> [Markus Stange] Remove some code that uses the preview filtered thread (#5336) [Markus Stange] Remove getMarkerSchemaName special cases - look up marker schemas from data.type and nothing else (#5293) [Markus Stange] Remove the makeProfileSerializable step - make the raw in-memory profile match the format that's stored in the file (#5287) [Nicolas Chevobbe] Adapt FilterNavigatorBar to High Contrast Mode. (#5257) [Nicolas Chevobbe] Adapt Tracks to High Contrast Mode. (#5252) [Markus Stange] Adjust string index fields in markers when merging threads (#5344) [Theodoros Nikolaou] Localize title and aria label in ProfileName (#5345) [Julien Wajsberg] Adapt time-slice selection in High Contrast Mode. (#5259) [Markus Stange] Make stackTable (sub)category derived data (#5342) [Markus Stange] Compute cpuRatio values when computing the derived thread (#5288) [Nazım Can Altınova] Add a context menu item to open the JS scripts in DevTools debugger (#5295) Also thanks to our localizers: el: Jim Spentzos fr: Théo Chevalier it: Francesco Lodolo [:flod] zh-TW: Pin-guang Chen
I haven't seen it show up as a performance problem, but it's a bit silly that we create a new samples table every time the preview selection changes. It should be possible to just ignore samples outside the range.
This PR doesn't actually get rid of the preview filtered thread, but it moves some things around so that such a change would be easier to make in the future.