getFps is a rolling average over 30 frames, whereas the other one is an average over the last second meaning over the last seconds we have an avg of 70 80 fps whereas the rolling average over the last 30 frames is about 14
I’d like to bounce on this old topic, because I have the same question and didn’t really find my answer here. I’m not having issues measuring the one or the other. I’m just not satisfied with the answer.
I have been looking at performance for 30sec. and I got the same results between FPS and absoluteFPS all the time, with twice the numbers for absoluteFPS.
What could be the cause of limitating the FPS (since I haven’t done any instruction for this, as far as I know). Could it be related to physics and the ammoJS plugin? How can I ensure I got max FPS (even with drops)? As you guys know from my posts by now, I’m no ENG, just a simple designer and PM. I’d still like to get a better understanding of this, so if somebody can point me towards the right direction or some articles, would be much appreciated. Thanks in advance,
Browsers are limiting your FPS to prevent any waste of frames as your screen would not be able to render them anyway.
So in the most common case, your browser will target 60FPS (not speaking VR or fancy monitors here). In this case the RequestAnimationFrame callback used to render frames will be called at 60 FPS only which give you 16ms to do everything you need. Your code on the other hand might run faster, lets say in ms, so basically here you could run at 250 FPS about which is what we call absoluteFPS.
Thank you. I do totally understand this part, but this is not my case. The code runs below 60fps (especially on older systems/GPU). I get things like an absolute FPS of 54 and an FPS of 25. With fairly stable numbers.
Oh, amazing. Thx so much for the info. I was indeed testing on a very old system (a decade old 1GB average at that time GPU) as compared to a fairly new (medium range) 4GB GPU from late 2019. I do now much better understand why I get this discrepancy.
I would have another question though: How should I understand the interframe calc, is this also “disregarding” GPU spent time? What could be the reason of getting (sometimes heavy) drops due to high interframe happening now or then (without actually interacting with the scene)? The reason for this all questionning is that I’m trying to make an update of my first real BJS demo (the snowball demo). So far, I got through about 60% of the process and already tripled the original FPS Reworking this first scene, that was probably oversized for my (absence of) knowledge of the moment is a nightmare but I still have hopes I can make it through before the release of v5