TempusGameIt CPU Improvements
One of the points that's been hanging around in the back of my mind for a while now has been the performance of the TempusGameIt client. It has reached the point in the app, where it was becoming important to make sure that we were performing as tightly as we could while also striving to stay accurate with time keeping.
As part of this initiative, I'm happy to announce that there are several improvements to overall CPU consumption by the app that are being released today.
Previously, the client would wake every .5 seconds and perform an audit of what was running. Have any games started? Is the game you're playing still running? This process can be expensive because we have to audit all running processes on your machine and make extra API calls to determine information like full paths, emulation details, etc. In retrospect, this had grown a little too aggressive, and would easily chew up 2-3% of your CPU just by running.
So I did some reflection and made some changes that I think will help overall reduce CPU usage
- While no game is running, the app will wake up every 5 seconds and look for a game. So at most, there will be a 5 second delay between when you started playing and when it is detected. We do have the actual start of when it starts--which is exposed in the processes that we inspect to actually make the match. So while it make take a few seconds to appear in the app, we do have the correct start time.
- When a game is running, you can now tune how frequently you want to check in on the status of the game. A new configurable slider allows you to set this period between .5 to 2 seconds. .5 is the current rate and can be more CPU intensive with the benefit of being more precise. If you're less concerned about precision on your gaming sessions, you can tune it up to 2 seconds.
I've observed that when tuned to be least intensive, my gaming desktop typically runs between 0 to 1% CPU usage, which I think is a big improvement!
The next improvement that I'm working through is a change that stops loading the entire 9k catalog of games we track into memory whenever you run the client. This is another design left over from a long time ago, and is certainly an easy win on reducing the footprint of the app on your machine.
Download the app today!
Comments
Post a Comment