On some pages - yes, on others - no. The main problem I am trying to solve with the Views, is to have only one Canvas mounted all the time, because unmounting a Canvas in Safari leaves some garbage behind that Safari does not know how to collect properly, and switching between 2D and 3D view (mounting and unmounting the canvas) a couple of times, crashes the app. No such problem in chrome. It turned out that the View introduces some complexity and reduces the FPS, so I will have to implement a custom light version of the View component
Were you rendering the multiple canvas before using View. Because if you were not then its totally clear that the frame drop you are experiencing is due to the rendering of multiple scenes.
Also I would suggest to change to a different browser that uses Chromium as its source, cause I have also faced many issue while creating R3F and three.js projects in Safari.
it might be getclientboundingrect, view needs to call that in order to figure where the container is located. but gcbr causes paint+calc on the dom, depending on how complex dom layout is it can be expensive. on the threejs side view just renders into a fbo, this isn’t what should cause the overhead.
can you make a simplified codesandbox for profiling?
Sandbox Sorry if the sandbox is not very helpful, im not really sure what to include as the 3d map consumes a lot of data from the mobx store, and there are also some models being loaded. Is there anyway to disable this getclientboundingrect?
Its me again. It turns out frames=1 actually did improve the performance on almost all maps and i reach 144fps, except one which probably needs to be optimised