Adjust string index fields in markers when merging threads#5344
Merged
mstange merged 1 commit intoJan 27, 2025
Merged
Conversation
julienw
approved these changes
Jan 27, 2025
julienw
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the fix, this looks good to me!
Comment on lines
+1305
to
+1316
| for (const fieldKey of stringIndexMarkerFields) { | ||
| const stringIndex = data[fieldKey]; | ||
| if (typeof stringIndex === 'number') { | ||
| const newStringIndex = newStringTable.indexForString( | ||
| stringArray[stringIndex] | ||
| ); | ||
| data = ({ | ||
| ...data, | ||
| [fieldKey]: newStringIndex, | ||
| }: any); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
(optional because probably not a perf problem): I'd do a clone of data before the loop, and do direct assignments on data inside the loop, instead of recreating data for each item.
Contributor
Author
There was a problem hiding this comment.
Hmm, I never replied to this... I think I saw both advantages and disadvantages with that approach, and then determined that it wasn't worth spending time debating it because this code will be removed once we have a shared string table.
fc45583 to
7893e16
Compare
Merged
canova
added a commit
that referenced
this pull request
Jan 30, 2025
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production | Deploy preview
Fixes #5098.