News for hackers. Stuff that matters.
Re:Towards Principled Reactive UI by cycloptic on Saturday September 26, 2020 @01:20PM (#24600463)
Now take that same code and run it on a mobile device. Can you say for certain that it's making optimal use of power? And if not, what changes would you have to make so it does?
Re:Towards Principled Reactive UI by stephc_int13 on Saturday September 26, 2020 @01:28PM (#24600524)
I'll do that later but I don't think it will lead to extreme CPU consumption.

There are many ways to improve performances of idle/almost idle ui.

Caching can be useful for large blocks of text as it tend to be the slowest thing to render.

But it is preferable to incrementally optimize/add complexity and check assumptions and not make large architectural decisions ahead of time.

One way to reason about it is to think in terms of pure data transformations.

Re:Towards Principled Reactive UI by cycloptic on Saturday September 26, 2020 @06:51PM (#24602788)
If you're caching data, you now have stored state and it's no longer a pure data transformation. You will run into these performance problems with any large data set, not just blocks of text.