Hacker News new | ask | show | jobs
by zaarn 3022 days ago
Then applications in WASM will have to reduce the number of these calls until it gets native.

This can be easily achieved by buffering calls to the DOM and merging batches of actions together (you could probably even divide DOM actions into priority queues to improve reaction time at expense of throughput in less important UI elements)

1 comments

I'm wondering if it would make sense to have a virtual DOM inspired by react. This would be faster than direct DOM access via a bridge.
A vastly simplified DOM if anything. I imagine each language will use native objects, like how .NET did it for a while.

But I don't think languages will interact with the DOM extensively once it has been properly abstracted.

One major difficulty would be to have it available quickly so a page refresh doesn't take until the WASM binary has sorted out it's internal state.