亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Table of Contents
Real user network performance status
Time to the first byte
First content drawing
First input delay
JAMstack helps improve network performance
Some thoughts from engineering leaders
Home Web Front-end CSS Tutorial A Look at JAMstack's Speed, By the Numbers

A Look at JAMstack's Speed, By the Numbers

Apr 15, 2025 am 10:39 AM

A Look at JAMstack's Speed, By the Numbers

JAMstack website is known for its speed, and this article will reveal the reasons through actual performance metrics. We will cover common metrics such as time to first byte (TTFB) and then compare data from various websites to see how different sync methods affect performance.

First, let's do a small analysis to provide some background information. According to HTTPArchive's metrics report on page loading, users wait on average 6.7 seconds to see the main content.

First Content Draw (FCP) – Measures the point in time when a text or graph is first rendered to the screen.

If we are talking about page engagement (interaction time), the user waits longer. The average interaction time is 9.3 seconds .

Interaction Time (TTI) – The time the user can interact with the page without delay.

Real user network performance status

The above data comes from laboratory monitoring and cannot fully represent the real user experience. Real user data based on Chrome User Experience Reports (CrUX) presents a more comprehensive picture.

I will use data aggregated from users who use mobile devices. Specifically, we will use the following metrics:

  • Time to the first byte (TTFB)
  • First Content Drawing (FCP)
  • First input delay (FID)

Time to the first byte

TTFB represents the time the browser waits for the first byte to receive the response from the server. For users around the world, TTFB ranges from 200 milliseconds to 1 second. This is a fairly long time to receive the first batch of data blocks of the page.

First content drawing

In 23% of the world's page views, FCP occurs after 2.5 seconds.

First input delay

The FID metric shows how quickly the web page responds to user inputs (such as clicks, scrolls, etc.).

Due to different limitations, CrUX does not have TTI data, but has FID, which even better reflects page interactivity. More than 75% of mobile user experiences have an input latency of 50 milliseconds and users have not experienced any lag.

You can use the queries below and use them on that site.

Data for July 2019 ``` [ { "date": "2019_07_01", "timestamp": "15619392000000", "client": "desktop", "fastTTFB": "27.33", "avgTTFB": "46.24", "slowTTFB": "26.43", "fastFCP": "48.99", "avgFCP": "33.17", "slowFCP": "17.84", "fastFID": "95.78", "avgFID": "2.79", "slowFID": "1.43" }, { "date": "2019_07_01", "timestamp": "1561939200000", "client": "mobile", "fastTTFB": "23.61", "avgTTFB": "46.49", "slowTTFB": "29.89", "fastFCP": "38.58", "avgFCP": "38.28", "slowFCP": "23.14", "fastFID": "75.13", "avgFID": "17.95", "slowFID": "6.92" } ]

<code>
</code><details><summary>BigQuery</summary> ```
#standardSQL
  SELECT
    REGEXP_REPLACE(yyyymm, '(\\d{4})(\\d{2})', '\\1_\\2_01') AS date,
    UNIX_DATE(CAST(REGEXP_REPLACE(yyyymm, '(\\d{4})(\\d{2})', '\\1-\\2-01') AS DATE)) * 1000 * 60 * 60 * 24 AS timestamp,
    IF(device = 'desktop', 'desktop', 'mobile') AS client,
    ROUND(SUM(fast_fcp) * 100 / (SUM(fast_fcp) SUM(avg_fcp) SUM(slow_fcp)), 2) AS fastFCP,
    ROUND(SUM(avg_fcp) * 100 / (SUM(fast_fcp) SUM(avg_fcp) SUM(slow_fcp)), 2) AS avgFCP,
    ROUND(SUM(slow_fcp) * 100 / (SUM(fast_fcp) SUM(avg_fcp) SUM(slow_fcp)), 2) AS slowFCP,
    ROUND(SUM(fast_fid) * 100 / (SUM(fast_fid) SUM(avg_fid) SUM(slow_fid)), 2) AS fastFID,
    ROUND(SUM(avg_fid) * 100 / (SUM(fast_fid) SUM(avg_fid) SUM(slow_fid)), 2) AS avgFID,
    ROUND(SUM(slow_fid) * 100 / (SUM(fast_fid) SUM(avg_fid) SUM(slow_fid)), 2) AS slowFID
  FROM
    `chrome-ux-report.materialized.device_summary`
  WHERE
    yyyymm = '201907'
  GROUP BY
    date,
    timestamp,
    client
  ORDER BY
    date DESC,
    client</details>

### Content Management System (CMS) Performance Status

CMS should be our savior and help us build faster websites. But judging from the data, this is not the case. The current performance of CMS globally is not ideal.

Data for July 2019 ``` [ { "freq": "1548851", "fast": "0.1951", "avg": "0.4062", "slow": "0.3987" } ]

<code>
</code><details><summary>BigQuery</summary> ```
#standardSQL
  SELECT
    COUNT(DISTINCT origin) AS freq,

    ROUND(SUM(IF(ttfb.start = 200 AND ttfb.start = 1000, ttfb.density, 0)) / SUM(ttfb.density), 4) AS slowTTFB

  FROM
    `chrome-ux-report.all.201907`,
    UNNEST(experimental.time_to_first_byte.histogram.bin) AS ttfb
  JOIN (
    SELECT
      url,
      app
    FROM
      `httparchive.technologies.2019_07_01_mobile`
    WHERE
      category = 'CMS'
    )
  ON CONCAT(origin, '/') = url
  ORDER BY
    freq DESC</details>

Here are the FCP results:

At least the FID results are better:

Data for July 2019 ``` [ { "freq": "546415", "fastFCP": "0.2873", "avgFCP": "0.4187", "slowFCP": "0.2941", "fastFID": "0.8275", "avgFID": "0.1183", "slowFID": "0.0543" } ]

<code>
</code><details><summary>BigQuery</summary> ```
#standardSQL
  SELECT
    COUNT(DISTINCT origin) AS freq,
    ROUND(SUM(IF(fcp.start = 1000 AND fcp.start = 2500, fcp.density, 0)) / SUM(fcp.density), 4) AS slowFCP,
    ROUND(SUM(IF(fid.start = 50 AND fid.start = 250, fid.density, 0)) / SUM(fid.density), 4) AS slowFID
  FROM
    `chrome-ux-report.all.201907`,
    UNNEST(first_contentful_paint.histogram.bin) AS fcp,
    UNNEST(experimental.first_input_delay.histogram.bin) AS fid
  JOIN (
    SELECT
      url,
      app
    FROM
      `httparchive.technologies.2019_07_01_mobile`
    WHERE
      category = 'CMS'
    )
  ON CONCAT(origin, '/') = url
  ORDER BY
    freq DESC</details>

As you can see, the performance of a website built with CMS is not much better than the overall performance of the website on the web.

You can find the performance distribution of different CMSs in this HTTPArchive forum discussion.

An e-commerce website is a great example of a website that is usually built on CMS, with a very bad page view statistics:

  • ~40% – TTFB is 1 second
  • ~30% – FCP over 1.5 seconds
  • ~12% – Page interaction delay.

I've met some clients who ask for support for IE10-IE11 because traffic from these users accounts for 1%, which is equivalent to millions of dollars in revenue. Please calculate how much your loss is if 1% of users leave immediately and never return due to poor performance. If the user is not satisfied, the business will also be dissatisfied.

To learn more about how network performance is associated with revenue, check out WPO Stats. Here is a list of research cases from real companies and their success stories after improving performance.

JAMstack helps improve network performance

With JAMstack, developers minimize rendering work on clients and instead use server infrastructure to handle most of the things. Not to mention, most JAMstack workflows are very good at handling deployments and contribute to scalability and other benefits. Content is stored statically on a static file host and provided to users via CDN.

Read Mathieu Dionne's "JAMstack Newbie? Everything You Need to Get Started" to get a better idea of ??JAMstack.

I have two years of experience using popular e-commerce CMS and we have had a lot of problems with deployment, performance, scalability. The team will spend days fixing these issues. This is not what the customer wants. These are the big problems that JAMstack solves.

Looking at the CrUX data, the performance of the JAMstack website looks great. The following values ??are based on websites provided by Netlify and GitHub. There are some discussions on the HTTPArchive forums where you can get involved to make your data more accurate.

Here are the results of TTFB:

Data for July 2019 ``` [ { "n": "7627", "fastTTFB": "0.377", "avgTTFB": "0.5032", "slowTTFB": "0.1198" } ]

<code>
</code><details><summary>BigQuery</summary> ```
#standardSQL
SELECT
  COUNT(DISTINCT origin) AS n,
  ROUND(SUM(IF(ttfb.start = 200 AND ttfb.start = 1000, ttfb.density, 0)) / SUM(ttfb.density), 4) AS slowTTFB
FROM
  `chrome-ux-report.all.201907`,
  UNNEST(experimental.time_to_first_byte.histogram.bin) AS ttfb
JOIN
  (SELECT url, REGEXP_EXTRACT(LOWER(CONCAT(respOtherHeaders, resp_x_powered_by, resp_via, resp_server)),
      '(netlify|x-github-request)')
    AS platform
  FROM `httparchive.summary_requests.2019_07_01_mobile`)
ON
  CONCAT(origin, '/') = url
WHERE
  platform IS NOT NULL
ORDER BY
  n DESC</details>

Here are the results of FCP:

Now let's look at the FID:

Data for July 2019 ``` [ { "n": "4136", "fastFCP": "0.5552", "avgFCP": "0.3126", "slowFCP": "0.1323", "fastFID": "0.9263", "avgFID": "0.0497", "slowFID": "0.024" } ]

<code>
</code><details><summary>BigQuery</summary> ```
#standardSQL
  SELECT
    COUNT(DISTINCT origin) AS n,
    ROUND(SUM(IF(fcp.start = 1000 AND fcp.start = 2500, fcp.density, 0)) / SUM(fcp.density), 4) AS slowFCP,
    ROUND(SUM(IF(fid.start = 50 AND fid.start = 250, fid.density, 0)) / SUM(fid.density), 4) AS slowFID
  FROM
    `chrome-ux-report.all.201907`,
    UNNEST(first_contentful_paint.histogram.bin) AS fcp,
    UNNEST(experimental.first_input_delay.histogram.bin) AS fid
  JOIN
    (SELECT url, REGEXP_EXTRACT(LOWER(CONCAT(respOtherHeaders, resp_x_powered_by, resp_via, resp_server)),
        '(netlify|x-github-request)')
      AS platform
    FROM `httparchive.summary_requests.2019_07_01_mobile`)
  ON
    CONCAT(origin, '/') = url
  WHERE
    platform IS NOT NULL
  ORDER BY
    n DESC</details>

Data shows that JAMstack websites perform best. The values ??of mobile and desktop are almost the same, which is even more amazing!

Some thoughts from engineering leaders

Let me show you a few examples of some well-known people in the industry:

Of the 468 million requests from @HTTPArchive, 48% were not served from the CDN. I visualized their service sources below. Many of these are requests for third-party services. The client that made the request is located in Redwood City, California. Delay is important. #WebPerf pic.twitter.com/0F7nFa1QgM

— Paul Calvano (@paulcalvano) August 29, 2019

JAMstack websites are typically hosted by CDNs and relieve TTFBs. Because file hosting is handled by Amazon Web Services or similar infrastructure, all websites can be improved with a single repair.

Another real survey shows that in order to get better FCP, it is best to provide static HTML.

Which one has better first meaningful drawing time?

① A raw 8.5MB HTML file containing all my 27,506 tweets full text ② A client-side rendered React website with only one tweet

(Spoiler: @____lighthouse reports that 8.5MB of HTML won about 200 milliseconds)

— Zach Leatherman (@zachleat) September 6, 2019

Here is a comparison of all the results shown above:

JAMstack improves network performance by providing pages statically using CDN. This is important because a fast backend takes a long time to reach the user and will be very slow. Similarly, a slow backend quickly reaches the user and will be very slow.

JAMstack hasn't won the performance contest yet because the number of sites using it is not as large as CMS, but the intention to win the contest is very good.

Adding these metrics to your performance budget ensures that you build good performance in your workflow. For example:

  • TTFB: 200 milliseconds
  • FCP: 1 second
  • FID: 50 milliseconds

Use it wisely?

Editor's Note: Artem Denysov comes from Stackbit, a service that greatly helps the launch of the JAMstack website, and more upcoming tools to simplify the workflow edge of the JAMstack website and content. Artem told me that he thanked Rick Viscomi, Rob Austin and Aleksey Kulikov for helping him review the article.

The above is the detailed content of A Look at JAMstack's Speed, By the Numbers. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1488
72
CSS tutorial for creating loading spinners and animations CSS tutorial for creating loading spinners and animations Jul 07, 2025 am 12:07 AM

There are three ways to create a CSS loading rotator: 1. Use the basic rotator of borders to achieve simple animation through HTML and CSS; 2. Use a custom rotator of multiple points to achieve the jump effect through different delay times; 3. Add a rotator in the button and switch classes through JavaScript to display the loading status. Each approach emphasizes the importance of design details such as color, size, accessibility and performance optimization to enhance the user experience.

Addressing CSS Browser Compatibility issues and prefixes Addressing CSS Browser Compatibility issues and prefixes Jul 07, 2025 am 01:44 AM

To deal with CSS browser compatibility and prefix issues, you need to understand the differences in browser support and use vendor prefixes reasonably. 1. Understand common problems such as Flexbox and Grid support, position:sticky invalid, and animation performance is different; 2. Check CanIuse confirmation feature support status; 3. Correctly use -webkit-, -moz-, -ms-, -o- and other manufacturer prefixes; 4. It is recommended to use Autoprefixer to automatically add prefixes; 5. Install PostCSS and configure browserslist to specify the target browser; 6. Automatically handle compatibility during construction; 7. Modernizr detection features can be used for old projects; 8. No need to pursue consistency of all browsers,

What is the difference between display: inline, display: block, and display: inline-block? What is the difference between display: inline, display: block, and display: inline-block? Jul 11, 2025 am 03:25 AM

Themaindifferencesbetweendisplay:inline,block,andinline-blockinHTML/CSSarelayoutbehavior,spaceusage,andstylingcontrol.1.Inlineelementsflowwithtext,don’tstartonnewlines,ignorewidth/height,andonlyapplyhorizontalpadding/margins—idealforinlinetextstyling

Creating custom shapes with css clip-path Creating custom shapes with css clip-path Jul 09, 2025 am 01:29 AM

Use the clip-path attribute of CSS to crop elements into custom shapes, such as triangles, circular notches, polygons, etc., without relying on pictures or SVGs. Its advantages include: 1. Supports a variety of basic shapes such as circle, ellipse, polygon, etc.; 2. Responsive adjustment and adaptable to mobile terminals; 3. Easy to animation, and can be combined with hover or JavaScript to achieve dynamic effects; 4. It does not affect the layout flow, and only crops the display area. Common usages are such as circular clip-path:circle (50pxatcenter) and triangle clip-path:polygon (50%0%, 100 0%, 0 0%). Notice

Styling visited links differently with CSS Styling visited links differently with CSS Jul 11, 2025 am 03:26 AM

Setting the style of links you have visited can improve the user experience, especially in content-intensive websites to help users navigate better. 1. Use CSS's: visited pseudo-class to define the style of the visited link, such as color changes; 2. Note that the browser only allows modification of some attributes due to privacy restrictions; 3. The color selection should be coordinated with the overall style to avoid abruptness; 4. The mobile terminal may not display this effect, and it is recommended to combine it with other visual prompts such as icon auxiliary logos.

How to create responsive images using CSS? How to create responsive images using CSS? Jul 15, 2025 am 01:10 AM

To create responsive images using CSS, it can be mainly achieved through the following methods: 1. Use max-width:100% and height:auto to allow the image to adapt to the container width while maintaining the proportion; 2. Use HTML's srcset and sizes attributes to intelligently load the image sources adapted to different screens; 3. Use object-fit and object-position to control image cropping and focus display. Together, these methods ensure that the images are presented clearly and beautifully on different devices.

What are common CSS browser inconsistencies? What are common CSS browser inconsistencies? Jul 26, 2025 am 07:04 AM

Different browsers have differences in CSS parsing, resulting in inconsistent display effects, mainly including the default style difference, box model calculation method, Flexbox and Grid layout support level, and inconsistent behavior of certain CSS attributes. 1. The default style processing is inconsistent. The solution is to use CSSReset or Normalize.css to unify the initial style; 2. The box model calculation method of the old version of IE is different. It is recommended to use box-sizing:border-box in a unified manner; 3. Flexbox and Grid perform differently in edge cases or in old versions. More tests and use Autoprefixer; 4. Some CSS attribute behaviors are inconsistent. CanIuse must be consulted and downgraded.

Demystifying CSS Units: px, em, rem, vw, vh comparisons Demystifying CSS Units: px, em, rem, vw, vh comparisons Jul 08, 2025 am 02:16 AM

The choice of CSS units depends on design requirements and responsive requirements. 1.px is used for fixed size, suitable for precise control but lack of elasticity; 2.em is a relative unit, which is easily caused by the influence of the parent element, while rem is more stable based on the root element and is suitable for global scaling; 3.vw/vh is based on the viewport size, suitable for responsive design, but attention should be paid to the performance under extreme screens; 4. When choosing, it should be determined based on whether responsive adjustments, element hierarchy relationships and viewport dependence. Reasonable use can improve layout flexibility and maintenance.

See all articles