I haven’t used Haxe/OpenFL in a while. So for a new project, I got everything updated and now I have this weird lag issue I can’t get rid anymore.
Basically once a second (or so) the FPS goes down to <10, then back up to >100FPS for a frame (in that frame it creates 300+ Floats for some mouse events) and back to the normal framerate (whatever i defined).
This happens constantly and with the most basic applications. Opening a blank window/project is enough (for me) to trigger this behavour.
There are no issues with HTML5. But Neko and CPP act like that.
I’ve asked in 2 different Discords in the last days and did not get further than people speculating about garbage collection, which turned out to be likely false.
Any ideas what this could be? And even more how i could get rid of it?
Just compiled it from scratch with the current lime development branch, but still
From what i can tell with hxscout there is no garbadge collection happening near the lags. Garbadge collection only happens rarely, especially on a plain blank canvas, but the lags keep on going in a recurring fashion.
Do you have some code connected to Event.ENTER_FRAME ?
At example if you add function update as Lib.current.stage.addEventListener(Event.ENTER_FRAME, update);
Sorrily no. It also happens with the most basic examples (i.e. just drawing one static bitmap to a black screen). I begin to suspect this is because i am on the lower spectrum of modern computing power.
I am using a “Intel® Core™ i7-6700 CPU @ 3.40GHz” and the onboard GPU “Intel® HD-Grafik 530” which i know is not high end, however it works for 99% of my use cases.
Plus i have build and released a game about a year ago on the same computer and never run into any issues like this.
Just as a idea , if you still keep the old OpenFL and Lime versions ( at example in C:\HaxeToolkit\haxe\lib\ , you can change .current file to point to that version ( from a year ago ) and after that to check if the problem still exist and is connected with the newest OpenFL / Lime or is something else.
That, HXScout or Flixels Debug tool. They all show kinda similar results (as in constant defined rate, then peak to >100, then drop to <10). I would not even mind slight FPS drops but even the mouse movement is stopped and there are very visible animation lags.