I noticed that there was a significant slowdown in the app I'm developing. I narrowed it down to being caused by initMaterial being called each frame under certain very specific conditions
. The minimum requirements to reproduce the bug (afaik) are:
If you don't notice the slowdown, use the performance tab in Firefox to measure the performance and you should see WebGLShader at the top of the call tree.

Hmm... If a material is shared between two scenes, initMaterial() is called with each use because:
materialProperties.lightsHash !== lights.state.hash
The hash is defined as:
state.hash = state.id + ',' + directionalLength + ... etc...
Even if the numbers and types of lights are the same in both scenes, state.id is different.
So, sharing a material between scenes will not be performant.
The work-around is to clone the material.
var mesh1 = new THREE.Mesh( geometry, material );
var mesh2 = new THREE.Mesh( geometry, material.clone() );
I guess I would call this a limitation.
And a duplicate of #14121.
The issue may be a duplicate, but the content is not.
There is useful information in this thread that is not in #14121, namely that there is a work around available.
And the implication is we should document this limitation and work-around somewhere if we are not going to consider this a bug and fix it.
I do not think we should close _any_ issue before it has been addressed.
In general we avoid multiple issues about the same topic. Since #14121 is the leading issue, you should transfer the workaround to this discussion.
OK. Perhaps we can close duplicates like so:
_Closing as a duplicate. Please continue the discussion in #14121._
Sounds good!
Most helpful comment
OK. Perhaps we can close duplicates like so:
_Closing as a duplicate. Please continue the discussion in #14121._