Performance issue vs updateMatrixWorld

Hi everyone!

I’ve noticed that there is a huge performance impact in linearRampToValueAtTime of PositionalAudio/AudioListener updateMatrixWorld. In chrome/edge FPS degraded to very low during time (may be it is internal browser’s issue or GC side effect) and devtools points to linearRampToValueAtTime function (big amount of scripting time spent on that) in updateMatrixWorld.

But the main question is why do updateMatrixWorld and such a things on invisible objects that don’t rendered as well as don’t used (for my case AudioListener/PositionalAudio) ??? I’ve added visible check inside of each updateMatrixWorld and it tuned performance a lot. May be it will be better to do it in project’s code as well ?

P.S. and also will be great to fix clock logic from my previous post ?

I don’t quite understand the issue, but positional audio should manage its position updated at all times, even if it is invisible and somewhere behind you. The position is used to provide different audio to ears, so you can “feel” objects behind you whether they are to the left or to the right or straight behind you.

If you think you do not need updateMatrixWorld, you can suspend automatic updates via property matrixWorldAutoUpdate.