Jump to content

Recommended Posts

Posted

When I have VSync on The program's CPU Usage stays around 4-6%. When I turn VSync off, the CPU Usage goes to about 50%. Is that big of a change normal?

 

EDIT: On that same note, I think its sweet that the CPU performance is so low when VSync in on. I use "While PeekEvent" in BMax (without any Leadwerks code) and the CPU Usage is about 50% but when I use leadwerks and set VSync on, it stays low (4-6%) so thats sweet.

Posted

If you add Sleep(10) (=Delay(10) in bmx) after Flip, you have 0% CPU usage. So CPU usage does not really say how much CPU is used, but rather how much idle time the application is giving out to Windows.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

I use Sleep(1) instead of Sleep(10). About 2% CPU usage but far more physics updates can be done in that time than just with VSync alone...

 

Since I run physics at 100 UPS that gives each step a total time of about 9 ms to run whilst still leaving time for networking (in future) and keyboard/mouse input.

LE Version: 2.50 (Eventually)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...