Skip to content
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

Change how ReactPerf.printWasted() and ReactPerf.printOperations() work #6632

Closed
gaearon opened this issue Apr 27, 2016 · 1 comment
Closed
Assignees

Comments

@gaearon
Copy link
Collaborator

gaearon commented Apr 27, 2016

#6046 is a rewrite of ReactPerf that aims to provide the existing features of ReactPerf in a more testable and future-proof way. However there are a few things that are out of scope of #6046 but are important to fix later after it is shipped.

Today, printOperations() prints informations about the DOM “native” events that supposedly happened. Later, this information is used by printWasted() in the following way: if a component was rendered but no DOM events on its children were emitted during a batch, the render is considered wasted.

There are a few problems with this:

I don’t know what would be a good solution considering these constraints. People widely consider printWasted() the most useful ReactPerf method because it helps finding shouldComponentUpdate() sweet spots. If we remove its reliance on DOM, we should offer an equivalent (e.g. deeply comparing React elements?) that is just as useful but more friendly to incremental reconciliation.

@gaearon
Copy link
Collaborator Author

gaearon commented Oct 4, 2017

We don't have ReactPerf in 16. Will need to rethink it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant