I tracked a large performance bottleneck in my SceneKit app for a nested loop that runs a few thousand times. In that loop is a bunch of code that zooms together quite happily, except for this one line:
was scenePos = presentation.position
It's more than 100 times slower than just asking for the PLUS dozens of other calculations, comparisons, sample lookups and method calls combined as I did in the same loop. I'm surprised no one seems to have commented on this yet, but I can find.
Why is this and is there a solution for it, except to make a copy of each knot presentation. Put yourself each frame so you don't have to ask the presentation code for it? Thanks.