Closed SassNinja closed 2 years ago
Having such a difference in the benchs means that probably there is a setup issue in your tests. For what I have quickly seen many of the tests use already compiled components while you render and compile riot components in runtime. Have you tried doing the same also with riot? Try to compile your components and then run the SSR
I was able to update the benchmarks and run them locally using benchmark.js that is a bit more reliable. I was then able to see that the Riot.js ssr render function is much slower than the other frameworks. I think the main reason is that I have used JSDOM for it and the order frameworks have implemented custom DOM serialization strategies.
For the sake of simplicity I think using JSDOM is still the easiest and most reliable solution for Riot.js but of course we can improve a lot the render function writing our custom DOM serialization mechanism.
At moment this feature is not on the top of my priorities but I accept help and contributions to improve it. In the end it shouldn't be that hard to replace JSDOM with cheeriojs or simple-dom.
@SassNinja it would be nice to see if this module is still slow compared to the alternatives. Could you please update the benchmarks? Thank you
closing this issue since no updates were provided.
I've been curious about the performance of riot ssr. After having found a ssr benchmark repo, I've forked it and added riot to the tests: https://github.com/SassNinja/ssr-benchmarks/tree/riot
I'm very surprised about the results because riot is much slower than any other library (more than 200x slower than svelte!)
Can you confirm riot ssr is not that fast or is there something wrong in my example riot tags? https://github.com/SassNinja/ssr-benchmarks/blob/riot/src/riot/App.riot