Re:When Is WebAssembly Going to Get DOM Support?
by markdog12 on Wednesday July 23, 2025 @01:25PM
(#44661701)
Yeah, it's very unfortunate for WebGL/WebGPU apps, where every call has to pass/convert typed arrays and issue a js gl call. It pretty much kills any advantage of using WASM. Hope that changes.
Re:When Is WebAssembly Going to Get DOM Support?
by breve on Wednesday July 23, 2025 @01:43PM
(#44661894)
WebAssembly is the faster option for WebGL applications on the web, not least because you also might want to run things like physics engines:
https://playgama.com/blog/general/boost-html5-game-performan...
Re:When Is WebAssembly Going to Get DOM Support?
by markdog12 on Wednesday July 23, 2025 @01:45PM
(#44661919)
All depends on your app, of course. My point is having additional overhead for every gl call is pretty bad.
Re:When Is WebAssembly Going to Get DOM Support?
by tcfhgj on Wednesday July 23, 2025 @05:45PM
(#44664375)
it's not really significantly bad: https://www.youtube.com/watch?v=4KtotxNAwME
Re:When Is WebAssembly Going to Get DOM Support?
by sitkack on Wednesday July 23, 2025 @01:48PM
(#44661947)
How can you reconcile this with all of the AAA games that have been shown to work well on Wasm+WebGL ? What is different between your usage and theirs?
Re:When Is WebAssembly Going to Get DOM Support?
by snapcaster on Wednesday July 23, 2025 @02:03PM
(#44662147)
A quick search shows that there aren't any AAA games that support those platforms. What are you referring to?
Re:When Is WebAssembly Going to Get DOM Support?
by Jyaif on Wednesday July 23, 2025 @01:57PM
(#44662064)
Which AAA games run well on Wasm+WebGL?
Re:When Is WebAssembly Going to Get DOM Support?
by breve on Wednesday July 23, 2025 @01:17PM
(#44661616)
Here are a couple of talks on Leptos (https://www.leptos.dev/), how it works and performs:
Re:When Is WebAssembly Going to Get DOM Support?
by giancarlostoro on Wednesday July 23, 2025 @01:19PM
(#44661634)
Not entirely sure, but C#'s Blazor is amazing. I can stick to purely C# code, front-end and back-end, we rarely call out to JS unless its for like file uploading dialogs. I don't want to ever touch JavaScript again after this workflow.
Edit:
And if you don't want to do "WebAssembly" you can have it do it all server rendered, think of a SPA on steroids.
Re:When Is WebAssembly Going to Get DOM Support?
by afiori on Wednesday July 23, 2025 @02:04PM
(#44662158)
According to a benchmark from 2018 it might not be expensive to go between js and wasm https://hacks.mozilla.org/2018/10/calls-between-javascript-a...
It is still the same jit calling itself, there is no reason it should be far slower than js-to-js
Re:When Is WebAssembly Going to Get DOM Support?
by fidotron on Wednesday July 23, 2025 @02:50PM
(#44662647)
This problem is how you spot people that have tried to do it vs those that just talk about it. Everyone ends up with batching calls back and forth because the cost is so high.
Separately the conceptual mismatch when the js has to allocate/deallocate things on the wasm side is also tedious to deal with.
This would sort of defeat the point that WASM is supposed to be for the "performance critical" parts of the application only. It doesn't seem very useful if your business logic runs fast, but requires so many switching steps that all performance benefits are undone again.