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

Perf.printWasted() is showing more instances than actual renders #4462

Closed
KeKs0r opened this issue Jul 22, 2015 · 2 comments
Closed

Perf.printWasted() is showing more instances than actual renders #4462

KeKs0r opened this issue Jul 22, 2015 · 2 comments

Comments

@KeKs0r
Copy link

KeKs0r commented Jul 22, 2015

Hi,

I am trying to analyse the performance of my app. I use Perf.printWasted heavily and face some weird behaviour.

I am usually activating Perf only for a single transition. When doing this for going from one view to another, I get a very long view of Performance waste. I was digging into it and tried to get rid of one single instance:
image

In the following example I am focusing on Index 1 ("betround_games >game") Which supposedly rerenders 27 times without changing the dom.

Since I am using PureRender, I was curious how often the render of betround_games and my game component is triggered. So i added a counter to both components render with the result:
betround_games render : 1
games render: 9 (for 9 different games)

So every instance is exactly rendered once. I also saw that sometimes adding new nodes is still counting as wasted time as shown in #1931

That would explain 9 wasted instances, but does not explain why Perf is counting 27 instances of wasted time.

Either I am understanding the measurement wrong or I make some wrong assumptions.

@jimfb
Copy link
Contributor

jimfb commented Jul 22, 2015

@KeKs0r If you could create a simple example that demonstrates the issue, that would be helpful in helping us investigate.

@gaearon
Copy link
Collaborator

gaearon commented May 23, 2016

I don’t know if this specific case is still accurate, but ReactPerf has been rewritten from scratch in 15.1.0, so this particular bug report is very likely no longer accurate. Since there is no described way to reproduce, I’m closing, but feel free to follow up if this still happens after 15.1.0!

@gaearon gaearon closed this as completed May 23, 2016
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

No branches or pull requests

4 participants