Hacker News
points by codedokode 2 hours ago | 0 comments
Egui is pretty bad idea. It uses "immediate mode" rendering which means whole window is redrawn on every mouse move. I ran PhotoCraft (built in Rust + egui) in a VM wihout a GPU and the UI felt like it was running on 3 fps. If you use egui, try running it without a GPU before releasing.

Egui is definitely not what you want to use on a 4K screen. It is only good for tiny screens of embedded devices.

Why there is no reactive UI that tracks all dependencies and redraws only what needs to be redrawn? (not React, it also re-calculates (but not redraws) everything on every change).

Also why does it visually look like bad version of Telegram? And Telegram can run without a phone present.

[–] fastball 2 hours ago
React doesn't re-calc on every change either if you use memoization and such properly.
[–] codedokode 2 hours ago
To use memoization you must use immutable structures (otherwise React is unable to detect changes) which are a pain to use and are slow if not designed properly. Do not believe me, try designing for example an algorithm that accepts a huge immutable sorted list with keys, a large sorted list of bulk deletes/inserts and produces a new sorted list with minimum operations. I made 2 or 3 prototypes and they still are not good and not even working properly.

In my book, a good UI framework simply attaches to a mutable model made of arbitrary objects, detect changes and displays it with minimum number of operations. Doesn't require to use any proxies or immutable data or store data in components. Shouldn't be difficult. Why nobody made it, I do not understand.

[–] asdf88990 1 hour ago
This is incorrect. You don’t need to use immutable structures to have stable references which is what matters.

Use context liberally instead of plumbing things through prop’s needlessly and you’re halfway there.