| ▲ | Rohansi 6 hours ago | |||||||||||||||||||||||||||||||
> requiring a web browser to draw a UI takes a LOT of CPU and memory What makes a browser so much more inefficient vs. other UI frameworks? Is it really the browser's fault or the website's you're visiting? | ||||||||||||||||||||||||||||||||
| ▲ | 5 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
| [deleted] | ||||||||||||||||||||||||||||||||
| ▲ | troupo 3 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||
What makes the browser slow and inefficient is the fact that it's not a UI framework. It's a system to display text and a couple of images on a 2D plane where every element depends on every other element. Almost every single interaction and change requires the browser to recalculate the layout of the entire page and to redraw it. It's basically Microsoft Word, with nearly the same behaviors. And there are no proper ways to prevent that behaviour. No lower and low level control over rendering. Awkward workarounds and hacks that browsers employ to try and minimize re-layouting and redrawing. Great rejoicing when introducing yet more hacks for basic things: https://developer.chrome.com/docs/css-ui/animate-to-height-a... etc. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||