-
Notifications
You must be signed in to change notification settings - Fork 47.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DevTools: Profiler refactor incremental changes #23185
DevTools: Profiler refactor incremental changes #23185
Conversation
b1cb43b
to
1571c58
Compare
Comparing: 2ed58eb...1154a73 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
154e92e
to
19cbce1
Compare
19cbce1
to
0c180ab
Compare
internalModuleSourceToRanges: Array< | ||
[string, Array<[ErrorStackFrame, ErrorStackFrame]>], | ||
>, | ||
laneToLabelMap: Array<[ReactLane, string]>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
laneToLabelMap: LaneToLabelMap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map
s don't serialize well. (They get converted to an empty object.) So we convert this to an array of key-value, as we do with the other maps in this data. Maybe I should rename the variable? The type is right though.
@@ -701,24 +684,7 @@ function processTimelineEvent( | |||
currentProfilerData, | |||
state.measureStack, | |||
); | |||
} else if (name.startsWith('--render-cancel')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why you deleted this and `--suspense-resuspend-'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed they weren't actually being used/logged anywhere.
const getCurrentTime = | ||
typeof performance === 'object' && typeof performance.now === 'function' | ||
? () => performance.now() | ||
: () => Date.now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious how accurate this is in getting the current time (also thinking about this for the transition tracing stuff) and if it matters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is what you're asking but we stub out the timer for DevTools tests so that it reads from unstable_now
(in scheduler/src/forks/SchedulerMock
) so that tests are repeatable.
Builds on top of PR #23158 and adds the following commits:
Related to #22529
Compare to the squashed
devtools-timeline-profiler-squashed
branchNote that this PR fixes the Timeline profiler feature so that it's usable again. It should be safe to merge into main.