Without any flashy marketing campaigns or social media fanfare, Valve rolled out a routine Steam Client update containing a very simple line in the patch notes: “Improved Steam Client startup performance.”
Without any flashy marketing campaigns or social media fanfare, Valve rolled out a routine Steam Client update containing a very simple line in the patch notes: “Improved Steam Client startup performance.”
“Reduced artificial delays by half”
- sleep(100)
+ sleep(50)
We have some of this, but it’s usually to ensure that some system or hardware is available.
We’re a kiosk app on android so get started automatically on boot, and sometimes storage isn’t available so we have to delay before loading our config or we get errors.
I know this might be unnecessary over engineering but there has to be a way to check when storage is available and wait for that instead of simply waiting for a fixed amount of time and hope that storage is available then.
There are calls we could make to query storage availability, but we can’t move forward at this particular point without loading the settings, so we need to wait.
We run on a limited number of devices, and know which manufacturers / devices have slow startups, so it’s a little less resource intensive to just wait a few ms on those devices than to continually query storage, or handle the missing storage exceptions in a loop (invoking error handlers is generally pretty expensive, and we don’t want to log this particular issue).
This is usually at a device reboot in the middle of the night when no one is working, so even a few seconds at startup isn’t the end of the world.
Why would you do that instead of polling with retry/backoff?
You may think this is a joke, but people will start complaining if a program is too fast.
I’m sure it happens, but in 25 years I’ve never had a client complain about anything being too fast.
Because they feel like (from their perspective) complex operations should require “effort” by the system and program so that they appear heavy and meaningful?
What does starting a program “too” fast mean? And who complained ever about it? Any links?
Psychology. People think that if a process completes remarkably quickly, it didn’t do the whole thing. Plenty of articles on the psychology of progress bars; take your pick.
One interesting scenario is that games used to have tips on their loading screens. With SSDs, everything loads so fast that if you might miss it if it closes automatically.
Regarding the loading screen scenario: I get that you would put tips in your loading screen so the player doesn’t get bored when he has to wait. But I would never artificially extend the loading duration to show tips.