The Cost of JavaScript [Link]

This is an absolutely fantastic article which is just as relevant to ClojureScript development as it is to any other JS language.

It perfectly summarizes why shadow-cljs uses :modules as the default and why it supports very fine grained Build Reports. :advanced is very very good and means that we don’t have to do much of the stuff the JS world has to do but :modules are still worth it in many projects. While easy npm access is nice it can also be a curse so always remember to check what those npm packages you use actually cost you via the build reports.

8 Likes

Yes! I’ve spent the last couple weeks optimizing our website before the go-live, and optimizing the JS code was honestly the easiest part. shadow-cljs has some great out-of-the-box tools to help with performance and optimizations. :+1: Really appreciate the work you’ve done in that.

1 Like

Also, holy crap - the median webpage is 15s until interactive??

How did you measure that ? With Chrome devtools “Audit” ?

Are you asking about that 15s number? I got that from the article. If you’re asking about how I went about measuring performance for my own site, I used Chrome devtools - mostly using the network tab and using DOMContentLoaded as a baseline, as well as New Relic metrics.

Finished reading the article. Won-der-ful. In the comment section there’s a link to a project that uses lighthouse to collect metrics and display them on a graphana dashboard.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.