-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Replace ReactPerf with new implementation #6647
Conversation
@gaearon updated the pull request. |
@@ -91,14 +90,6 @@ function inject() { | |||
); | |||
|
|||
ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); | |||
|
|||
if (__DEV__) { |
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.
This block has moved to ReactDebugTool
.
@gaearon updated the pull request. |
3 similar comments
@gaearon updated the pull request. |
@gaearon updated the pull request. |
@gaearon updated the pull request. |
This is ready for review now, and has tests salvaged from the previous implementation. |
Technically this shouldn't happen but it seems possible with ReactNativeMount.unmountComponentAtNode(). For now, let's just ignore these lifecycle events because ReactPerf makes a hard assumption that all lifecycle hooks happen inside batches. We can revisit later when we have a comprehensive test suite for ReactPerf itself.
It is necessary to exclude just mounted components from wasted calculation.
Rebased on the current master. |
@gaearon updated the pull request. |
What's the summary of the current state of the new perf? Where have it been deployed? As anyone other than us tested it? Seems good to at least have some eyes on it before we kill the old one forever, no?
|
I tested it on some of the open source apps/examples that I maintain. The results are consistent with what I’d expect them to be. Internally we don’t really use the console version of ReactPerf so I’m not sure what you mean by having it deployed.
No, but we can cut 15.1.0-alpha and ask people to try.
Sure, I agree. I still think it’s safe to land in master because if we find bugs, we can add more test cases for them. I don’t think we’ll find bugs though until we release this in some form. |
Ping @sebmarkbage, anything I can do on my side? |
Ok. Hope this works! :) |
Let’s cut 15.1.0-alpha with this? I have some people in mind who might help us test it! |
I'd like to @gaearon but won't be there for the next 2 weeks :) |
Replace ReactPerf with new implementation (cherry picked from commit b6a6078)
This removes the old ReactPerf implementation and replaces it with the one from #6046.
Corresponding React Native PR: facebook/react-native#7283
To be exact:
ReactPerf
,ReactDefaultPerf
, andReactPerfAnalysis
are removed.ReactDebugTool
(added in Add new ReactPerf #6046) takes care of measurements, andReactPerfAnalysis
is renamed to justReactPerf
.