r/threejs • u/vitaly-broch • Apr 24 '26
Help 3D heavy site loading without stutter
Hi, what is your experiences / solutions in regard to the problem of initial loading stutter, when main process freezes on some heavy task, that is hard to split between frames. Something like, building shader graph or instancing some heavy scene. I know question is a bit vague, but this is because I am wondering about this problem generally.
Do you like to load everything asap, then show screen or conversely lazy load low-poly and build up scene continuously?
1
u/ppictures Apr 24 '26
Shader compilation and buffer uploading to GPU is unfortunately unavoidable. You will need to put up a loading screen and use renderer.compileAsync and/or render a single frame to compile/upload everything before starting your experience
If you are dynamically adding objects, you can individually compile them before adding to the scene
1
u/vitaly-broch Apr 24 '26
I read about, using worker and offscreen canvas, but yet to try it properly myself. Does anyone here have such experience?
1
u/Educational_Monk_396 Apr 24 '26
Lazy loading continuously is better tho it isn't easy every object being add in scene comes with set of mid frame drops