The Truth about Rust/WebAssembly Performance

preview_player
Показать описание
Over the last six months, frontend frameworks written in Rust and WebAssembly have begun overturning the old narrative that WASM is too slow for DOM rendering. In this video we'll take a look at several Rust/WASM frameworks to try to understand the truth about Rust/WASM performance.

EDIT: To clarify about the memory usage: Something changed in the benchmark at some point in the way memory use is being reported, and I'm not sure why that is. If you go back to slightly earlier runs you can see better memory comparisons in which, for example, Sycamore is significantly more efficient than Solid, Yew much more memory efficient than React, etc. I'm pretty sure it was the benchmarking that changed, not the frameworks.

Links:
Рекомендации по теме
Комментарии
Автор

Sorry for the super small text! I forgot to bump it up in the terminal, but it's not a coding-focused video so hopefully it doesn't ruin it for you!

gbjxc
Автор

I appreciated the way you talked about the entire ecosystem in a positive and uplifting or factual way here

chrisbiscardi
Автор

The creator of solidjs was a former co-worker of mine, and the framework we used at that company was god awfully slow, so it's pretty cool that he's created such a fast framework!

forivall
Автор

honestly besides the WASM vs vanillajs differences there's a LOT of information in this video, about how virtual DOM works, about various framework internals, there's the string encoding part and all your videos are like this, these really feel like a behind the scenes type video which is really cool

oxey_
Автор

Maybe it was unintentional but, I learned so much from this presentation that you earned yourself a subscriber.

ceriusgeek
Автор

Maintainer of Yew here, this video was very helpful and informative. I want to clarify for any readers that the latest version had a performance regression which is fixed in git repo but it being a community maintained project, none of the maintainers have had the time to release it.

I would like to have a chat about web assembly performance and improving Yew's performance, if you, Greg, or anyone else, is down for that

elina
Автор

As the creator of GxiRs-gxi, I am thrilled to witness developers carrying forward the idea that I had envisioned for wasm front-end frameworks. Due to time constraints, I haven't been able to devote much attention to the project myself. Nevertheless, I want to express my utmost support and enthusiasm for the ongoing progress. Kudos to all involved in the project!

aniketfuryrocks
Автор

Really well formulated video. As a react dev interested in moving to wasm, this was a perfect intro into the space

ahmadaccino
Автор

Greg, I highly appreciate your content. I already compared the table back in the days but I love your thoughts and opinions.

romanstingler
Автор

The "hope" of WASM replacing HTML+CSS+JS altogether isn't really from the performance standpoint, it's from development standpoint. Being able to develop everything in eg. Rust, skipping all the current kinks of JS, overall reducing the overhead as well as workload, the entry barrier, pretty much everything about it would be awesome and I'd pick this any day over a traditional front end stack even if it was a bit slower initially.

DMSBrian
Автор

Perf is one thing, the DX, the platform, and the options are another. Edge rendering, hybrid apps, RSC, sharing ts types... So much has gone into the JS ecosystem that my hesitation has been "what _else_ will I be giving up?" or "what does a full stack rust platform/stack look like?"

FWIW i think lamba/edge starts for rust + using wasm in the browser could be spectacular. Like give 2-5x runway on free tiers perhaps if based on compute time!

But dev productivity is an interesting angle, higher startup, lower maintenance?

seannewell
Автор

There should be a conference of all lead devs of the frameworks of this benchmark. I am in!

lp
Автор

The part that I'm interested the most about rust FE frameworks is the server-side speed, you can generate pages orders of magnitude faster with rust compared to nodejs, with the bonus of everything being written in the same language, so no dealing with js for client-side. But the amount of code to transfer and the memory usage is what turns me away from using a WASM framework the same way I don't want to touch React with a stick, and that's because of mobile. Most people daily drive slow devices with unreliable mobile internet connections, which is a problem when the page they try to use takes ages to load, doesn't download properly, or just straight up crashes the browser because of high memory usage, something more common than one would expect.

I really hope WASM improves and resolves the issues holding it back, so we can finally get to use another real language in webdev, besides HTML.

allesarfint
Автор

Thanks for shedding light on some of the misconceptions about Rust and WASM! It is really cool to see there's actually not that much of a difference between vanillaJS and other Rust frameworks! What an exciting time we live in!

desuburinga
Автор

Continuing to enjoy the organization, clarity, and focus your videos. Keep up the great work!

tommycard
Автор

Thank you SO much man for how you've done the introduction! I wish more people did this "gist-of-the-video" type of intros, it saves so much time!

social.elenakrittik
Автор

It's very possible that WASM will be more popular in serverside than in browser.
WASM-containers are really interesting

yukasngas
Автор

Ok, after days of searching and fiddling around, this video answered all of my questions. You sir, are a godsend. Was so confused with different frameworks and opinions. Thanks again!

MrJatan
Автор

This was illuminating. Thanks, Greg!

I think the biggest drawback of WASM for front-end apps is iteration time. Changes you make in your code can take a bit to compile and show on the screen (and you’ll lose whatever state the app was in), whereas JS reflects them immediately. This is less important if most of your changes are to the logic and not the visuals, but otherwise, it can be a pain.

Speaking of, would it be possible to somehow separate the logic from the visuals? To detect if the changes necessitate recompiling? Maybe the dev environment could have a watcher/build script that morphs the DOM instead, like Phoenix seems to?

verified_tinker
Автор

Such an informative video man. I really enjoyed the behind the scenes explanations from an expert like yourself :)

rtsa