Remix.run Logo
▲ LoganDark a day ago

> Why there is no reactive UI that tracks all dependencies and redraws only what needs to be redrawn?

Nowadays the focus seems to be on video game-style interfaces that redraw every frame. The justification for this is typically that computers are so fast they can now come up with the entire interface every frame, so why not take advantage of that and forget all this retained-mode complexity?

They don't realize that this is a classic case of the developer's machine fallacy, where the developer has a machine so vastly more powerful than any of their users' that they produce a terrible experience for said users. This is also why games these days typically require upscaling even on 5090, because developers usually have that or something even more powerful and they think the bleeding edge is pushing even THAT machine to its knees.

Developers should be testing their software on the most entry-level, bottom of the barrel Chromebooks from 2015, running the heaviest and most bloated operating system they can think of. If people still optimized their software for that, then maybe computers would still feel almost as fast as the Apple II from 1977.

https://danluu.com/input-lag/

▲codedokode a day ago | parent [-]

And obviously all computers have infinite capacity batteries to maintain game-level power consumption.

▲SkiFire13 a day ago | parent | next [-]

Depending on what you're doing GPU accelerated rendering is more battery friendly than CPU rendering though.

▲codedokode 19 hours ago | parent | next [-]

How long can a phone run on a battery when playing games? A day? Or an hour? Clearly shows how "efficient" GPU is.

▲LoganDark 16 hours ago | parent [-]

I mean, if the game used CPU for rendering, it would last even less long.

▲LoganDark a day ago | parent | prev [-]

Drawing the entire interface is more expensive than drawing only what changed, though. You don't have to give up the GPU for that.

▲SkiFire13 9 hours ago | parent [-]

The GPU will re-render everything anyway. What you can at most optimize is the upload of data to the GPU (i.e. upload only what has changed).

Also consider that if your UI framework supports z-level, opacity and other features like that then determining what has changed for rendering is much more complex than just determining what UI elements have changed.

▲LoganDark a day ago | parent | prev | next [-]

That's actually a very good point, I haven't seen any care for power consumption from software developers in many many years. The only people who seem to still care about it are hardware developers like Valve and Apple. I admit I never thought about it myself either.

I would figure that doing less work generally requires less power, but some developers are crazy and act like they own the whole CPU, generate tons of heat, stress out the cooling system etc. with multithreaded bullshit that did NOT need to be multithreaded.

▲proneb1rd a day ago | parent [-]

Not sure why multi threading is a victim. It really depends.

▲LoganDark a day ago | parent [-]

It does indeed depend.

Some multithreaded workloads will use the full logical processor count to pin every core and that can really suck on low-end systems. I think aside from balancing multithreading overhead, this is one of the reasons why some more advanced software (such as 7-Zip) lets you select the number of threads to use for a workload, even if you already know and accept that it'll be expensive until it's completed.

Lots of multithreading things I come across as a developer have a default of something like 4 threads, or only use a certain fraction of logical cores up to a certain maximum, etc. because it's generally more polite not to always pin every core.

▲rixed a day ago | parent | prev [-]

Or are plugged into a world with infinite quantity of renewable energy.

▲ a day ago | parent [-]
[deleted]