3 ms·
The rust-js layer can be slow. But the actual rust code is much faster than the equivalent JS in my experience. My project would not be technically possible wit
by ChadNauseam 8mo ago
The rust-js layer can be slow. But the actual rust code is much faster than the equivalent JS in my experience. My project would not be technically possible with javascript levels of performance
- resonious 8mo agoThat's fair and makes sense. In my case it was just a regular web app where the only reason for it being in Rust was that I like the language.
- tcfhgj 8mo agodid you profile what made it so slow specifically? sounds waaaaay worse than I would expect
- resonious 8mo agoI did. I don't remember the specifics too well but a lot of it was cold starts. So just crunching the massive wasm binary was a big part of it. Otherwise it was the matchit library and js interop marshalling taking the rest of the time. edit: and it cold started quite often. Even with sustained traffic from the same source it would cold start every few requests.
- tcfhgj 8mo agothe JS layer is slow, indeed, but it shouldn't be that much slower that it meaningfully impacts frontend apps A demonstration of that by the creator of Leptos: https://www.youtube.com/watch?v=4KtotxNAwME https://www.youtube.com/watch?v=4KtotxNAwME
- ChadNauseam 8mo agoFascinating video, thanks for sharing.