3 ms·
think of it like webassembly for html/css right now it's like this get html -> read html -> read css -> build tree -> calculate styles -> apply styles to tree
by techsin101 8y ago
think of it like webassembly for html/css
right now it's like this
get html -> read html -> read css -> build tree -> calculate styles -> apply styles to tree -> paint the tree
what I'm thinking is this...
get html/binary -> read it -> paint the tree
- mr_toad 8y agoYou still have to deserialise it, parse it, and build a DOM tree. You can’t just overlay a series of bytes into browser memory like you can with executable code, because the in-memory representation of the DOM tree is browser specific, and in some cases proprietary and undocumented. And I suspect that in many cases the possibility of causing buffer overflows and other unexpected side effects by being able to target browser memory direct is too great for browser manufacturers to take the risk. Java has had the ability to do something like what you propose with object serialisation, and they are considering removing it because of the risks.