lynaghk / cljs-react-perf

Performance experiments w/ CLJS React libraries and techniques.
40 stars 1 forks source link

Rum & Sablono optimizations #6

Open roman01la opened 7 years ago

roman01la commented 7 years ago

Here's a repo with some macros to optimize Rum & Sablono https://github.com/funcool/rumext Basically there are a couple of additional compile forms for Sablono and lazy-component function which delays Rum component instantiation which improves start up time.

lynaghk commented 7 years ago

Thanks for the pointer. Is this a project you worked on?

I can't tell from the repo the author's motivations:

roman01la commented 7 years ago

the author is @niwinz I don't know why it is not in Sablono and Rum, but additional compiler forms for Sablono obviously avoids more interpret calls, which results in a better perf and output bundle size. The same goes to lazy components, it improves startup time.

here's a note on lazy components in Rum's wiki https://github.com/tonsky/rum/wiki/Optimizations

lynaghk commented 7 years ago

This startup time thing would be an awesome addition to this repo. It was before React, but when I worked on The Weathertron cljs/html mobile app we did a ton to try and improve startup time.

Since this delay test doesn't fit into the re-render test runner, I'll have to do something custom. What do you think about:

Running this 10x times for each namespace and reporting on the timings should measure any benefits of "delay".

Do you think that'd be a reasonable way to test this? Any suggestions/alternatives?