Izzimach / react-three-legacy

React bindings to create and control a 3D scene using three.js
Other
1.53k stars 128 forks source link

FPS is dropping on macbook pro #97

Open Dhyey opened 7 years ago

Dhyey commented 7 years ago

Hi I am using macbook pro, OS X El Capitan, 8GB RAM, i5 Processor with Intel Iris Graphics 6100 1536 MB.

When I use your spherical panorama example and measure FPS in chrome, it is dropping very frequently.(See the screenshot)

fps dropping with react and redux

However, in threejs example, which follows very much the same structure and logic except for react and redux packaging, has very steady 60FPS on the same system and browser. (visit https://threejs.org/examples/webgl_panorama_equirectangular.html)

It would be great if we can make this library perform similar to original threejs library.

Izzimach commented 7 years ago

Do you mean it's dropping frames? Not sure why that happens. You can try building in production mode and minimizing the code to see if that reduces GC pauses. There isn't one by default since most people will just set that up in their build pipeline.

You can also try to turn off redundant rendering by adding the enableRapidRender:false prop to Scene as described in #29.

Besides that, I dunno. You would need to run a profiler to see where the code is hiccuping and maybe that would provide more info.