-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
fix[react-devtools]: record timeline data only when supported #31154
fix[react-devtools]: record timeline data only when supported #31154
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
a2751c2
to
0f68c00
Compare
0f68c00
to
55baf7b
Compare
55baf7b
to
d9b913b
Compare
d9b913b
to
0415673
Compare
) { | ||
const mergedProfilingSettings: ProfilingSettings | void = | ||
typeof profilingSettings === 'object' && profilingSettings != null | ||
? {...profilingSettings, recordTimeline: false} |
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.
Wait so does it mean we will never respect recordTimeline: true
pass in from initialize
? Could we add a comment explaining this? e.g. if store
is the only way to set this to true
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.
Good catch, yeah, I should just default it to false
here. Forgot that react-devtools-core
might be used not only for React Native.
0415673
to
2b2d55e
Compare
Stacked on #31132. See last commit.
There are 2 issues:
We can't currently fix the second one, because we would still need to generate all these stacks, and this would still take quite a lot of time. As of right now, we can't generate a component stack lazily without relying on the fact that reference to the Fiber is not stale. With
enableOwnerStacks
we could populate component stacks in some collection, which would be cached at the Backend, and then returned only once Frontend asks for it. This approach also eliminates the need for keeping a reference to a Fiber.