
Ask HN: Can React pump 10,000 bunnies? - dakom
I took a rough go at using React to drive something like the &quot;PIXI bunnymark&quot;, and performance sucks:<p>https:&#x2F;&#x2F;github.com&#x2F;dakom&#x2F;react-pixi-bunnymark<p>Is the bottleneck React itself? I&#x27;ve tried a few different things you can see there (introducing mutability, using PureComponent, etc.) but the numbers are still not great (it should be able to hit 10,000 bunnies at 60fps easily without a hiccup on a consumer desktop pc, I get slowdowns way before that)<p>Someone mentioned looking into how React-Native does things and somehow replacing the renderer... but I&#x27;m not sure if that&#x27;s really very different from what&#x27;s happening here since ultimately the drawing is done by rendering null and pushing commands to PIXI. In other words the render tree really is just in-memory classes, there&#x27;s nothing pixi&#x27;s actually rendering when you get to the end of the line, so I&#x27;m not sure if replacing the renderer is worth the headache (there&#x27;s no bunny-mark on the pixi-react project but I&#x27;ve opened an issue to ask for one so maybe if they can beat this, there&#x27;s hope).<p>Looking for some veteran advice before I go down this rabbit-hole (pun intended). Like most things with performance tuning, theory is nice but if you can prove your suggestion by showing the gains either with a fork or a similar showcase, that&#x27;s much better (500 cells on a page doesn&#x27;t count, even at like 3,000 bunnies this is fine)
======
acemarke
Hi. Afraid I don't have time to dig into the actual behavior of this myself,
but I do have links to a number of articles on optimizing React perf at
[https://github.com/markerikson/react-redux-
links/blob/master...](https://github.com/markerikson/react-redux-
links/blob/master/react-performance.md) .

You might also want to drop by the Reactiflux chat channels at
[https://www.reactiflux.com](https://www.reactiflux.com) and see if anyone has
any suggestions.

~~~
dakom
Wow that's some collection you got there!! nicely done

------
shams93
Try it with infernojs it has basically the same structure as react but is
supposedly much higher performance this might be a great demo for react versus
inferno performance if you find significantly better inferno performance for
what is basically the same code on your end.

~~~
dakom
Cool, hadn't looked into inferno before. Just joined the slack and asked there
- thanks!

------
dakom
Btw this is my first "Ask HN" post... not sure if I did it right since I don't
see it on the "ask" tab and everything's greyed out :\\. Happy for advice on
that front too ;)

