-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Never sleep with common.framerate.max -2 #1102
base: master
Are you sure you want to change the base?
Conversation
3ab1ffc
to
9209ceb
Compare
How can a busy loop where you just poll for events a million times per second possibly be better than sleeping? |
9209ceb
to
8d5daab
Compare
Hmm… right I should better skip the loop entirely. 🤣️ Now done. |
8d5daab
to
6244b99
Compare
How is the new version supposed to be different than putting |
I was just going to say the same. 🤣️ I wrote that yesterday late in the night, it looks like my brain wasn't fully functionnal. 🤡️ |
0d1177e
to
5450acd
Compare
I don't like how there is only 1 value that enables the reasonable version of unlocked FPS and 2147483647 values that enable the version that clearly violates the system's design assumptions. It should be harder to do it by accident. BTW I'd be skeptical of any "performance measurements" made with 0 ms frame lengths. Some code could be skipped if it assumes something is already up to date since the time hasn't changed... |
Why not make sure this one never does anything unless cheat is enabled? |
Well… we may benchmark the performance of the game, or the performance of the environment. This also helps me notice how hardware pieces, hardware performance profiles, or drivers, or compiler level of optimizations, etc. have impact on how fast the computer go to compute the game (even if doing some part uselessy and redundantly). When reaching some level of fastness of the hardware and software environment, once I reach the 1000fps cap I can't know if this or that option makes the engine run faster. I started thinking seriously about implementing this option in our code and just not rely on throwaway patches (like I did for years) when I delivered a computer some weeks ago and out of curiosity I ran the game, set |
How do you mean? Max FPS can't be a cheat cvar. |
I guess having another CHEAT cvar to disable all FPS limitations would work. |
5450acd
to
9488ee3
Compare
I added a commit that implements my idea of a cheat value. |
Never sleep with
common.framerate.max -2
.This is useful when benchmarking for performance, to avoid benchmarking the sleep function.