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

Add failing test demonstrating a ReactPerf warning #7191

Conversation

nathanmarks
Copy link

Related issue: #6949

When using ReactPerf from a component, I'm getting results back from Perf.getWasted(measurements) but I'm seeing this warning crop up too:

Warning: There is an internal error in the React performance measurement code. We did not expect componentDidMount timer to stop while no timer is still in progress for another instance. Please report this as a bug in React.

cc @gaearon

I simplified the component that I shared in the issue for this failing test. The use case that led me to stumble into this is using a react component as a test fixture to benchmark re-render performance programatically.

The simplified test component cycles through a single state change and resolves in componentDidUpdate before checking the console error output. The warning is actually firing in the componentDidMount hook as soon as ReactPerf.start(); is called.

(here's another jsfiddle with the simplified version: https://jsfiddle.net/69z2wepo/47901/)

@ghost
Copy link

ghost commented Jul 5, 2016

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 [email protected]. Thanks!

@nathanmarks
Copy link
Author

nathanmarks commented Jul 5, 2016

Have emailed to get the CLA sorted.

@gaearon
Copy link
Collaborator

gaearon commented Jul 6, 2016

Thank you so much! I built #7202 on top of it, let’s discuss there.

@gaearon
Copy link
Collaborator

gaearon commented Jul 11, 2016

Should be fixed in 15.2.1, can you verify?

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

Successfully merging this pull request may close these issues.

2 participants