We’ve been struggling with performance drops in our game caused by the garbage collector kicking in, but so far we’ve been unable to determine what is generating the garbage.
To get to the bottom of this, I created a new project and ran it on an iPhone XS using the Web Inspector in Safari on my Mac to profile it. For some reason, the garbage collector is kicking in every 10th second – and this is just the sample scene with the cube on a plane and nothing else going on.
Why is this happening? Why is PlayCanvas generating garbage and/or running the garbage collector every 10th second?