Earlier quoted context omitted.
> The actual motion-to-photon delay (measurable with a high-speed camera) in a well optimized competitive FPS is somewhere around 20ish ms or less these days, so it's on par with it in regards to the input lag I.e. more than two frames between input and output. That is quite a lot, and AFAIK a large regression.
It’s the exact same amount of time - why would the frame count matter?
Most UI applications are broken real-time applications
131–140 of 151 posts
Re: Most UI applications are broken real-time applications
#132I agree with the main gist of the article and a lot of the points, but disagree on a few specifics. 1) mlock isn’t meant to be called on all your memory, just something that needs it to operate correctly. The situation the author described where the system comes to a halt as memory contents are paged in and out of memory/disk is (subjectively) worse when the only option is for the OOM killer to begin reaping processe…
> The situation the author described where the system comes to a halt as memory contents are paged in and out of memory/disk is (subjectively) worse when the only option is for the OOM killer to begin reaping processes everywhere. This one's interesting since your outcome often depends on what hardware you have. On systems with slow IO, i.e. a slow HDD, it's possible for swapping to make a system entirely unusable fo…
Re: Most UI applications are broken real-time applications
#133Earlier quoted context omitted.
It’s the exact same amount of time - why would the frame count matter?
1 - 2 frames is a lot of time and latency this big is perceptible in many tasks, fast-paced videogames being just one of them.
Re: Most UI applications are broken real-time applications
#134Earlier quoted context omitted.
Not just that. You hit a key and the game could react in literally the next frame. There was an immediacy you don't get now.
Metal Slug on the PS4 was jarringly unresponsive compared to my expectations, though I'm not sure I've played it on an arcade machine in 20 years so maybe it's my memory or physiology at least partly to blame.
Re: Most UI applications are broken real-time applications
#135Earlier quoted context omitted.
If you're actually doing busy logic then it'll block the UI thread, but you have to work pretty hard to do that, and IO won't block the UI thread
All you need to is `await` an IO operation on the UI thread.
Re: Most UI applications are broken real-time applications
#136Earlier quoted context omitted.
Just start with the fact that all desktop programs had a menu bar where you could find every feature - and at least on Windows - also a shortcut for that feature. This was broken with Ribbon and the hamburger menus that every application seems to have switched to for no other reason it seems than to copy Chrome. To be fair Ribbon is somewhat useable again, but the in the first version I have no idea how people were s…
A related detail, even things like icon design have gone in a strange direction. In the interest of simplicity they've gone from recognizable to rather amorphous blobs. A button for print has gone from a clearly recognizable image of a printer, enough you could probably even guess the model number, to the icon being a rounded square with another rounded square sticking out the middle top. Many of these newer icons ar…
Re: Most UI applications are broken real-time applications
#137Earlier quoted context omitted.
All you need to is `await` an IO operation on the UI thread.
Not true. The await statement will kick the operation over to the event loop to wait for a response, and the thread itself will keep humming along (pulling other events off the loop, handling animations and scrolling, etc)
Re: Most UI applications are broken real-time applications
#138Earlier quoted context omitted.
Not true. The await statement will kick the operation over to the event loop to wait for a response, and the thread itself will keep humming along (pulling other events off the loop, handling animations and scrolling, etc)
Not on await, no, unless the caller/awaiter is async too?
- Page scrolling/rendering
- If the user triggers an event, like clicking on a button, that JS event handler is independent from the waiting function and can run while it's waiting
- Same thing if some other `await`ed IO resolves; that function can resume while the other one is still waiting
This is why async/await exists. It allows our code to tell the runtime "let me know when this is ready, otherwise do whatever you want in the meantime". Many languages have a similar feature now, but in JavaScript it's especially fundamental to the language and ecosystem, which means code gets written this way by default, which means JS programs don't have the problem mentioned in the OP by default.
Re: Most UI applications are broken real-time applications
#139Earlier quoted context omitted.
Not on await, no, unless the caller/awaiter is async too?
The function containing the `await` waits, but the thread does not; it switches to doing other things: - Page scrolling/rendering - If the user triggers an event, like clicking on a button, that JS event handler is independent from the waiting function and can run while it's waiting - Same thing if some other `await`ed IO resolves; that function can resume while the other one is still waiting This is why async/await…
I'm assuming it is on the programmer to do some smart debouncing in the event handler?
Re: Most UI applications are broken real-time applications
#140Earlier quoted context omitted.
Not on await, no, unless the caller/awaiter is async too?
The function containing the `await` waits, but the thread does not; it switches to doing other things: - Page scrolling/rendering - If the user triggers an event, like clicking on a button, that JS event handler is independent from the waiting function and can run while it's waiting - Same thing if some other `await`ed IO resolves; that function can resume while the other one is still waiting This is why async/await…