3 ms·
Can you talk about about performance implications of using WASM? 1. The browser needs to load the whole app before anything else could be done resulting in a s
by mvelbaum 2y ago
Can you talk about about performance implications of using WASM?
1. The browser needs to load the whole app before anything else could be done resulting in a slow first load.
2. WASM -> DOM manipulation is slow.
- LeftHandPath 2y ago1: Actually, that's not true! I use Leptos in their "islands" mode for server side rendering. The entire page is sent as an HTML response, and there is little/no "hydration". The WASM file ONLY includes interactive "islands" that are explicitly marked with the #[island] attribute [0]. In other words, the server binary is handling most of the rendering, similar to if I used a templating tool like Askama or Tera. 2: Leptos is generally slower than vanilla JS, I believe for that reason, but comparable to major JS frameworks [1, 2]. [0]: https://book.leptos.dev/islands.html https://book.leptos.dev/islands.html [1]: https://krausest.github.io/js-framework-benchmark/current.html https://krausest.github.io/js-framework-benchmark/current.ht... [2]: https://leptos.dev/ https://leptos.dev/
- klaussilveira 2y agoWhat about event listeners that are supposed to listen to elements inside the islands? Like clicks, key ups, etc. Who handles that?