-
Notifications
You must be signed in to change notification settings - Fork 48.4k
Perf actual React components #5264
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
Conversation
@gfogle updated the pull request. |
b7b0fe5
to
eb23bf1
Compare
@gfogle updated the pull request. |
FYI - travis is complaining about dangling comma rule. I get that this simplifies the diff, but it really looks weird to see those. fixing now though. |
eb23bf1
to
87eb4cf
Compare
@gfogle updated the pull request. |
1 similar comment
@gfogle updated the pull request. |
this._instance[method] | ||
); | ||
} | ||
}.bind(this)); |
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.
bind
isn't necessary, forEach
takes a second arg, being thisarg
if desired - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
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 point
@gfogle updated the pull request. |
@sebmarkbage - I think this is a much clearer picture of the prior PR i closed because the commit history was just not worth rebasing out to reflect final implementation. |
4b24149
to
34292a0
Compare
@gfogle updated the pull request. |
@gfogle updated the pull request. |
We've just recently started work on a new perf tool. #6046 This will allow us to do refactoring to the code base without breaking the perf tools all the time. Could you maybe check if your issue can be solved in #6046? Sorry for the inconvenience. We didn't plan for this new tool to replace the old one at this point. |
Working through #5254
I'm hijacking the lifecycle methods of the react components and then enabling DefaultPerf to measure them and print high-level statistics on the measures.
I started at a basic implementation. Would like to submit subsequent PRs with more advanced functionality such as tracking # of times returned true vs false for shouldComponentUpdate, etc.