# Loading Speed across JS Frameworks

**URL:** <https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479>\
**Category:** Analysis\
**Created:** [September 18, 2018, 11:46pm UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479 "2018-09-18T23:46:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![housseindjirdeh](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/housseindjirdeh/32/1398_2.png) [@housseindjirdeh](https://discuss.httparchive.org/u/housseindjirdeh)\
**Post date:** [September 18, 2018, 11:46pm UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/1 "2018-09-18T23:46:51Z")

</div>

I wanted to see if it would be possible to track web page performance across different JS frameworks. I knew that WPT already supported Wappalyzer, but was super glad to stumble on @paulcalvano’s excellent analysis of [CPU times grouped by framework](https://discuss.httparchive.org/t/using-wappalyzer-to-analyze-cpu-times-across-js-frameworks/1336) by extracting it’s data.

Extending the query that he used previously to now find the median FP, FCP, FMP and TTI for desktop:

```
SELECT jsframework,
       count(*) freq,
       ROUND(APPROX_QUANTILES(firstPaint, 100)[SAFE_ORDINAL(50)]) firstPaint,
       APPROX_QUANTILES(firstContentfulPaint, 100)[SAFE_ORDINAL(50)] firstContentfulPaint,
       APPROX_QUANTILES(firstMeaningfulPaint, 100)[SAFE_ORDINAL(50)] firstMeaningfulPaint, 
       APPROX_QUANTILES(timeToInteractive, 100)[SAFE_ORDINAL(50)] timeToInteractive
FROM (
  SELECT REGEXP_REPLACE(
              JSON_EXTRACT(payload,"$._detected.JavaScript Frameworks"),
              r"([0-9.\"\s]+)", 
              "") jsframework,
        CAST(JSON_EXTRACT(payload, "$['_firstPaint']") as FLOAT64) firstPaint,
        CAST(JSON_EXTRACT(payload, "$['_firstContentfulPaint']") as INT64) firstContentfulPaint,
        CAST(JSON_EXTRACT(payload, "$['_firstMeaningfulPaint']") as INT64) firstMeaningfulPaint,
        CAST(JSON_EXTRACT(payload, "$['_TimeToInteractive']") as INT64) timeToInteractive
  FROM `httparchive.pages.2018_09_01_desktop`
)
GROUP BY jsframework
ORDER BY freq DESC

```

![56%20PM](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/httparchive/original/2X/f/ffd553648ee49a9c6dc5672915dac6977ae6c1f7.png)

Now if we filter for popular frameworks and query against mobile:

```
SELECT jsFramework,
       count(*) freq,
       ROUND(APPROX_QUANTILES(firstPaint, 100)[SAFE_ORDINAL(50)]) firstPaint,
       APPROX_QUANTILES(firstContentfulPaint, 100)[SAFE_ORDINAL(50)] firstContentfulPaint,
       APPROX_QUANTILES(firstMeaningfulPaint, 100)[SAFE_ORDINAL(50)] firstMeaningfulPaint, 
       APPROX_QUANTILES(timeToInteractive, 100)[SAFE_ORDINAL(50)] timeToInteractive
FROM (
  SELECT REGEXP_REPLACE(
              JSON_EXTRACT(payload,"$._detected.JavaScript Frameworks"),
              r"([0-9.\"\s]+)", 
              "") jsFramework,
        CAST(JSON_EXTRACT(payload, "$['_firstPaint']") as FLOAT64) firstPaint,
        CAST(JSON_EXTRACT(payload, "$['_firstContentfulPaint']") as INT64) firstContentfulPaint,
        CAST(JSON_EXTRACT(payload, "$['_firstMeaningfulPaint']") as INT64) firstMeaningfulPaint,
        CAST(JSON_EXTRACT(payload, "$['_TimeToInteractive']") as INT64) timeToInteractive
  FROM `httparchive.pages.2018_09_01_mobile`
)
WHERE 
 jsFramework='React' OR 
 jsFramework='AngularJS' OR 
 jsFramework='Angular' OR 
 jsFramework='Angular,Zonejs' OR 
 jsFramework='Vuejs' OR 
 jsFramework='Polymer'
GROUP BY jsFramework
ORDER BY freq DESC

```

![02%20PM](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/httparchive/original/2X/7/74501487ebdfcef5519208e8eb31c6e43b5a60e8.png)

Some interesting things here 🤔:

• `Angular,Zonejs` has significantly more entries than `Angular` so I assume Wappalyzer mostly uses this to categorize Angular 2+ applications?  
• Polymer results are a bit shocking. ~27s TTI? I would have assumed significantly better results here.

* * *

We can extend the SELECT clause to 50/75/95 percentiles:

```
SELECT jsFramework,
       count(*) freq,
       ROUND(APPROX_QUANTILES(firstPaint, 100)[SAFE_ORDINAL(50)]) firstPaint50,
       ROUND(APPROX_QUANTILES(firstPaint, 100)[SAFE_ORDINAL(75)]) firstPaint75,
       ROUND(APPROX_QUANTILES(firstPaint, 100)[SAFE_ORDINAL(95)]) firstPaint95,
       APPROX_QUANTILES(firstContentfulPaint, 100)[SAFE_ORDINAL(50)] firstContentfulPaint50,
       APPROX_QUANTILES(firstContentfulPaint, 100)[SAFE_ORDINAL(75)] firstContentfulPaint75,
       APPROX_QUANTILES(firstContentfulPaint, 100)[SAFE_ORDINAL(95)] firstContentfulPaint95,
       APPROX_QUANTILES(firstMeaningfulPaint, 100)[SAFE_ORDINAL(50)] firstMeaningfulPaint50,
       APPROX_QUANTILES(firstMeaningfulPaint, 100)[SAFE_ORDINAL(75)] firstMeaningfulPaint75,
       APPROX_QUANTILES(firstMeaningfulPaint, 100)[SAFE_ORDINAL(95)] firstMeaningfulPaint95,
       APPROX_QUANTILES(timeToInteractive, 100)[SAFE_ORDINAL(50)] timeToInteractive50,
       APPROX_QUANTILES(timeToInteractive, 100)[SAFE_ORDINAL(75)] timeToInteractive75,
       APPROX_QUANTILES(timeToInteractive, 100)[SAFE_ORDINAL(95)] timeToInteractive95
....

```

![13%20PM](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/httparchive/original/2X/c/cef37a358963d5d55acc21fb8d353332c9bb1d3c.png)

---

<div class="post-metadata">

**Author:** ![housseindjirdeh](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/housseindjirdeh/32/1398_2.png) [@housseindjirdeh](https://discuss.httparchive.org/u/housseindjirdeh)\
**Post date:** [September 18, 2018, 11:55pm UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/2 "2018-09-18T23:55:11Z")

</div>

I would also love to query against page weight (median total JS bytes) across different JS frameworks but not sure how easy that would be. Would it be possible to cross-reference against `httparchive.pages`? 🤔

---

<div class="post-metadata">

**Author:** ![rviscomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/rviscomi/32/835_2.png) [@rviscomi](https://discuss.httparchive.org/u/rviscomi)\
**Post date:** [September 19, 2018, 12:08am UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/3 "2018-09-19T00:08:46Z")

</div>

Nice work @housseindjirdeh! Love to see deeper analysis into JS frameworks.

> [@housseindjirdeh](#):
>
> • `Angular,Zonejs` has significantly more entries than `Angular` so I assume Wappalyzer mostly uses this to categorize Angular 2+ applications?

Haven’t double checked but IIRC the result is a comma-separated list of frameworks, so unless you’re splitting by a comma you’re not getting all of the sites with each framework but rather the sites with only those frameworks. Probably not a huge deal since most sites wouldn’t have more than one framework (or so you’d hope) but that may account for the Zonejs thing.

I would also caution against reading too much into loading speed metrics here. HTTP Archive is a synthetic dataset so the performance data may or may not be representative of real user experiences. THAT SAID, there are exciting possibilities when we join it with the Chrome UX Report, which does have FP, FCP, and FID distributions from real users. See [CMS Performance](https://discuss.httparchive.org/t/cms-performance/1468) for an example of analysis that joins the datasets.

---

<div class="post-metadata">

**Author:** ![housseindjirdeh](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/housseindjirdeh/32/1398_2.png) [@housseindjirdeh](https://discuss.httparchive.org/u/housseindjirdeh)\
**Post date:** [September 19, 2018, 12:18am UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/4 "2018-09-19T00:18:32Z")

</div>

Yep! Definitely agree that we can begin to analyze JS framework results a bit more, hence why I kicked off this topic to start some discussion around it.

Thanks a ton for the feedback, I agree that this really isn’t representative of actual user experience - I’ll fiddle around with CrUX datasets and see if I can land on something a bit more tangible!

---

<div class="post-metadata">

**Author:** ![paulcalvano](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/paulcalvano/32/1601_2.png) [@paulcalvano](https://discuss.httparchive.org/u/paulcalvano)\
**Post date:** [September 19, 2018, 2:52am UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/5 "2018-09-19T02:52:48Z")

</div>

Nice work on this! I definitely think there’s a lot more we can learn about the cost of frameworks by digging in deeper.

You can join the httparchive.pages table to the httparchive.summary\_pages table to pull in some of the page weights. For example, this query adds the the median JavaScript bytes to your table -

```sql
SELECT jsframework,
       count(*) freq,
       ROUND(APPROX_QUANTILES(firstPaint, 100)[SAFE_ORDINAL(50)]) firstPaint,
       APPROX_QUANTILES(firstContentfulPaint, 100)[SAFE_ORDINAL(50)] firstContentfulPaint,
       APPROX_QUANTILES(firstMeaningfulPaint, 100)[SAFE_ORDINAL(50)] firstMeaningfulPaint, 
       APPROX_QUANTILES(timeToInteractive, 100)[SAFE_ORDINAL(50)] timeToInteractive,
       APPROX_QUANTILES(bytesJs, 100)[SAFE_ORDINAL(50)] bytesJs
FROM (
  SELECT REGEXP_REPLACE(
              JSON_EXTRACT(payload,"$._detected.JavaScript Frameworks"),
              r"([0-9.\"\s]+)", 
              "") jsframework,
        CAST(JSON_EXTRACT(payload, "$['_firstPaint']") as FLOAT64) firstPaint,
        CAST(JSON_EXTRACT(payload, "$['_firstContentfulPaint']") as INT64) firstContentfulPaint,
        CAST(JSON_EXTRACT(payload, "$['_firstMeaningfulPaint']") as INT64) firstMeaningfulPaint,
        CAST(JSON_EXTRACT(payload, "$['_TimeToInteractive']") as INT64) timeToInteractive,
        bytesJs
  FROM `httparchive.pages.2018_08_15_desktop` pages
  INNER JOIN `httparchive.summary_pages.2018_08_15_desktop` summary_pages
  ON pages.url = summary_pages.url
  )
GROUP BY jsframework
ORDER BY freq DESC

```

![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/httparchive/original/2X/5/550084b5b0295b276a48972ec2e85305a58709d6.png)

_(Note: that above query used the 8/15 dataset, since it seems that the summary\_pages table does not exist for 9/1 yet)_

---

<div class="post-metadata">

**Author:** ![tomayac](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/tomayac/32/1105_2.png) [@tomayac](https://discuss.httparchive.org/u/tomayac)\
**Post date:** [September 19, 2018, 6:28am UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/6 "2018-09-19T06:28:19Z")

</div>

In case anyone is interested in understanding Wappalyzer, it’s all happening in this [JSON file](https://github.com/AliasIO/Wappalyzer/blob/master/src/apps.json), which follows this [format](https://www.wappalyzer.com/docs/specification).

---

<div class="post-metadata">

**Author:** ![samdutton](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/samdutton/32/1407_2.png) [@samdutton](https://discuss.httparchive.org/u/samdutton)\
**Post date:** [September 19, 2018, 2:51pm UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/7 "2018-09-19T14:51:46Z")

</div>

Also occurred to me it would be nice to compare load speed across frameworks for pages with similar total payload size, which might make it more likely that you’re comparing like with like (if that makes sense!)

---

<div class="post-metadata">

**Author:** ![housseindjirdeh](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/housseindjirdeh/32/1398_2.png) [@housseindjirdeh](https://discuss.httparchive.org/u/housseindjirdeh)\
**Post date:** [September 19, 2018, 7:46pm UTC](https://discuss.httparchive.org/t/loading-speed-across-js-frameworks/1479/8 "2018-09-19T19:46:55Z")

</div>

@paulcalvano that’s amazing, thank you so much. So so excited to see how much deeper we can go here 🚀

@tomayac cheers thank you. @developit’s kicked off an [issue](https://github.com/AliasIO/Wappalyzer/issues/2450) to improve how they detect (just looking for global variables limits their results to sites that aren’t bundled with Webpack/Rollup)

@samdutton Agreed, someone else mentioned the same earlier today. It definitely adds more validity to the numbers to be able to compare along the same payload size. We can also also create separate buckets of data for different payload sizes (100-200 KB, 200 - 300 KB, etc…) so folks can explore any to see metrics
