Openfl.display.FPS doesn't show actual FPS?

Hi, so I noticed something weird the other day. My game’s framerate as reported by openfl.display.FPS started at ~30 and continued to be reported as that.

But the actual performance of my game slowed down until it was actually rendering maybe 2 frames a second? I’m not sure what the cause of the slow-down was.

This is with the windows target.

OpenFL 2.0.1 I think? Technically I think it’s a Git version (this commit) but the haxelib.json says 2.0.1.
Lime 1.0.1
Lime-tools 1.5.7

Did you ever figure this out?

Any comments @singmajesty ?

I have never seen a disconnect between the two, perhaps it is reliant on your game logic somewhere. The FPS is updated by the number of times Event.ENTER_FRAME is called per second, which occurs in sequence with the GL render

Yeah I understand this a bit more now but I still don’t have a self-contained example.

Was really hard to track down and I still don’t really understand it. It seems to be related to adding other enter frame event listeners to the stage. Maybe? I dunno.

@singmajesty here’s a testcase:

It consists of code which looks like it should be fine, and runs fine in Flash, but on Neko it causes a performance hit and on CPP it quickly causes major problems.