Repetitive Stuttering of animation [ SOLVED ]

Running ThreeJS in Chrome with all the GPU flags set, running on an Nvidia RTXA2000(8GB) Intel i9 CPU.

My project is an interactive MULTI SCENE VJ thing. On start-up each scene is created, populated with its objects and then we loop only through ONLY the active scene. There is an array that stores all the inactive scenes.

If I have more than like 20 scenes, I’m noticing this weird behaviour, Here is one animation and an explainer

I have an animation that is dynamically updating 320 Line2 Segments (each with 50 vertices)

Im generating 20 groups with 16 lines each. Each group generates 1 set of 50 vertices for line 0 and then I’m cloning geometries for lines 1 to 15.

Each animation call does this:
geometry[ LineIndex ].dispose();
geometry[ LineIndex ].copy( geometry[0] );

Its generally very smooth and fast with each animation call lasting 16-17ms

But every 2 or 3 seconds it stutters! And 1 animation loop takes 70-100ms

If I comment out the .dispose() the stuttering gets way worse, in the order of 1600ms per animation loop.I cant see anything different happening during those long running loops in code.

If I have just 1 scene in my scene array there are no performance issues, but if I add a bunch of scene it starts getting worse. From my understanding your not actually doing any work on any scene unless its being passed to the renderer.

OK I found the problem may be that all the scenes, WHILST NOT BEING ACTIVELY RENDERED, need to be set to FALSE

sceneArray[ sceneIndex ].visible = false;

Im not seeing the same stuttering after this