C++, 50% CPU usage of empty OpenFL project

Hello again,

Can’t seem to win a battle of getting stuff to work. :slight_smile:

Anyway, i noticed very high CPU usage spikes in my current project (OpenFL 2.2.8), so i tried testing in a new, empty project using latest openfl 3.0.0-beta.3 version. Now instead of spikes, i get pretty constant 50% CPU usage with rare drops to ~35%.

Project: http://pasteboard.co/2fyYcGWw.png
Profile results with “Very Sleepy CS”: http://pasteboard.co/2fyyNjG1.png

I have no idea where to start in order to fix this problem, so any help would be appreciated.

Thanks

2 Likes

Is that with or without -Dlegacy, C++ or Neko?

without, c++ windows debug (http://pasteboard.co/2fyYcGWw.png)

How does it perform if you use “openfl test windows -Dlegacy”

Try in release mode, maybe the debug code is slowing the app.

I don’t think that debug code makes huge performance difference like that.
Could you try running that app on different machine? It might be GPU driver specific issue.
Actually my laptop’s GPU (GeForce) had high CPU-usage issue too, but not always. Recent version of NVIDIA driver seemed to fix that problem.

I think that might be it. I have ATI 4850 card and it’s quite buggy. I will try and see if Android works fine, because i only need Windows just for testing.

Maybe disabling vsync makes difference.

You were right. It was vsync.

Thanks. :smile:

Hmm, perhaps we should disable the timers and just let things run if window vsync is true