Quantcast
Channel: Loading Speed across JS Frameworks
Viewing all articles
Browse latest Browse all 8

Loading Speed across JS Frameworks

$
0
0

@paulcalvano wrote:

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 -

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

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

Read full topic


Viewing all articles
Browse latest Browse all 8

Trending Articles