-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
temporarily fixes printWasted abnormality #4683
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@spicyj or @sebmarkbage, any feedback on this? See also Jae's awesome blog posts about optimizing React perf here: |
The https://github.com/facebook/react/blob/master/src/renderers/dom/shared/ReactDOMComponent.js#L512 You could intercept it similarly to this: https://github.com/facebook/react/blob/master/src/test/ReactDefaultPerf.js#L209 That should let you log the ID of newly mounted DOM nodes without needing to parse the HTML content. That's a bit safer. We're also actively trying to get rid of both IDs in the DOM and generating innerHTML content so that solution would help a lot. |
I'm not sure if you meant to actually intercept the mounts in the measure function, but I did, and it works for my test cases. Too good to be true? |
Does it work equally well if you call I can merge this if you squash your commits. |
I agree that that is pretty noisy. Let's keep it how you have it – mind squashing your commits into one? |
I'm having some trouble squashing my commits because I pulled and merged from
|
Try: |
Looks like you figured it out. |
temporarily fixes printWasted abnormality
(Thank you!) |
No longer prints wasted time for newly created DOM nodes
any feed back is greatly appreciated