chinedufn / percy

Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
https://chinedufn.github.io/percy/
Apache License 2.0
2.25k stars 84 forks source link

Implement Performance Metrics #153

Open L1lith opened 2 years ago

L1lith commented 2 years ago

I think performance metrics would be a really good tool for pushing the performance of Percy, and to draw in new users! My idea was that you could get a set of small sample of web apps that are functionally the same, and then implement them all in the performance testing. This feature and other kinds of tests would be really nice because you could show off the performance benefits of Percy vs other js/rs frameworks, and it could help the Percy project measure their optimization progress and find problem areas.

I think the concept behind the Percy project is really cool. Rust is a really cool language in a unique position to provide giant performance benefits, but to me it seems like the community's been slow to recognize the benefits of isomorphic architecture which was so popular in JS. An architecture which seems like it could be very efficiently abstracted away by Macros, so it's cool to see that Percy exists :)

chinedufn commented 2 years ago

Hey!

As you can probably tell, I'm a big believer in Rust's future in the web space (be it with Percy or other libraries).

I'm not so sure that Percy would outshine JavaScript frameworks in performance today.

I haven't done any benchmarking, but I suspect that the rate-limiting factor is DOM API calls, which until interface types are implemented should be slower than JS.

That being said.. Benchmarks would definitely be useful as a way to help the libraries trend towards being more efficient over time. (as long as it isn't at the expense of usability.)

qm3ster commented 2 years ago

According to https://github.com/krausest/js-framework-benchmark Rust WASM libraries (dominator, yew) are currently competitive in update performance rawgit com_krausest_js-framework-benchmark_master_webdriver-ts-results_table html Quite bad at initial startup rawgit com_krausest_js-framework-benchmark_master_webdriver-ts-results_table html (1) But best at memory allocation rawgit com_krausest_js-framework-benchmark_master_webdriver-ts-results_table html (2) It would be interesting to see a percy implementation in the same table.