top | item 17304419

(no title)

jeremiep | 7 years ago

A render list would be more efficient than a tree, simply because you're not jumping left and right in RAM with cache misses on every jump.

A hashmap of nodes on screen is still very high level; you're basically replacing the DOM with data, yet keeping the exact same structure. But now you lose static types and everything is slower.

Redrawing doesn't happen at the node level either; that would be terribly inefficient. Things are instead batched together.

You don't have to compile your styles to CSS currently; just write them as JS objects and call the CSS constructors yourself from code. You'll quickly find its not productive for most styling.

I simply don't believe the vast majority of developers to be able to properly handle rendering at that level. No offence but all your points about low-level rendering is not how it actually works. Its incredibly easy to fool yourself into thinking you wrote a well-designed, efficient piece of code and learn years later every single piece of it was far from optimal.

Thats why we have layers of abstractions.

discuss

order

No comments yet.