# The Cost of JavaScript \[Link\]

**URL:** https://clojureverse.org/t/the-cost-of-javascript-link/2584
**Category:** shadow-cljs
**Created:** [August 2, 2018, 8:04am UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584 "2018-08-02T08:04:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![thheller](https://clojureverse.org/user_avatar/clojureverse.org/thheller/32/534_2.png) [@thheller](https://clojureverse.org/u/thheller)
#### Post date: [August 2, 2018, 8:04am UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584/1 "2018-08-02T08:04:07Z")

</div>

> **[The Cost Of JavaScript In 2018 – Addy Osmani – Medium](https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4)**
>
> Building interactive sites can involve sending JavaScript to your users. Often, too much of it. Have you been on a mobile page that looked…

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](https://github.com/thheller/shadow-cljs) uses [:modules](https://shadow-cljs.github.io/docs/UsersGuide.html#CodeSplitting) as the default and why it supports very fine grained [Build Reports](https://shadow-cljs.github.io/docs/UsersGuide.html#_build_report). `: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.

---

<div class="post-metadata">

### Author: ![lilactown](https://clojureverse.org/user_avatar/clojureverse.org/lilactown/32/1221_2.png) [@lilactown](https://clojureverse.org/u/lilactown)
#### Post date: [August 3, 2018, 3:45pm UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584/2 "2018-08-03T15:45:54Z")

</div>

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. 👍 Really appreciate the work you’ve done in that.

---

<div class="post-metadata">

### Author: ![lilactown](https://clojureverse.org/user_avatar/clojureverse.org/lilactown/32/1221_2.png) [@lilactown](https://clojureverse.org/u/lilactown)
#### Post date: [August 3, 2018, 3:47pm UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584/3 "2018-08-03T15:47:35Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DjebbZ](https://clojureverse.org/user_avatar/clojureverse.org/djebbz/32/531_2.png) [@DjebbZ](https://clojureverse.org/u/DjebbZ)
#### Post date: [August 4, 2018, 5:44pm UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584/4 "2018-08-04T17:44:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![lilactown](https://clojureverse.org/user_avatar/clojureverse.org/lilactown/32/1221_2.png) [@lilactown](https://clojureverse.org/u/lilactown)
#### Post date: [August 6, 2018, 11:18pm UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584/5 "2018-08-06T23:18:55Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![DjebbZ](https://clojureverse.org/user_avatar/clojureverse.org/djebbz/32/531_2.png) [@DjebbZ](https://clojureverse.org/u/DjebbZ)
#### Post date: [August 7, 2018, 6:39am UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584/6 "2018-08-07T06:39:40Z")

</div>

Finished reading the article. Won-der-ful. In the comment section there’s a link to a [project](https://github.com/boyney123/garie) that uses lighthouse to collect metrics and display them on a graphana dashboard.

---

<div class="post-metadata">

### Author: ![thheller](https://clojureverse.org/user_avatar/clojureverse.org/thheller/32/534_2.png) [@thheller](https://clojureverse.org/u/thheller)
#### Post date: [February 5, 2019, 6:39pm UTC](https://clojureverse.org/t/the-cost-of-javascript-link/2584/7 "2019-02-05T18:39:41Z")

</div>

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