A Jamstack build is not automatically a fast build. The architecture earns its reputation from edge caching of static files, but every decision made after that point — what ships to the browser, what third parties run in the head, how images are loaded — still lands on the client. To see how far those decisions can drag a site down, we can deliberately sabotage a fresh Gatsby project and audit each step with Google Lighthouse.
The baseline
Start with the standard Gatsby scaffold, install the CLI and create a project, then cd into slow-jamstack and run the development server. Lighthouse needs a production build on a live host, so the site goes to Vercel via its command-line tool after logging in. The default site audits at a performance score of 100 — the ceiling — and a Time to Interactive of 1.9 seconds. Every change from here gets pushed to production and re-measured with Lighthouse in Chrome DevTools, so regressions are attributable to a specific commit.
Mistake one: shipping a whole CSS framework
CSS frameworks pull a lot of weight, and the sane approach is a modular or CSS-in-JS option that loads only what's used. Instead, pick a full framework to style a single button component — the heaviest one available. Comparing published framework sizes points to SemanticUI. The correct way to consume it would be through its Sass or Less source, importing only the needed pieces; the wrong way, which we take, is linking the entire stylesheet and its jQuery dependency in the document head.
Gatsby doesn't expose html.js in src until you copy the cached default:
cp .cache/default-html.js src/html.js
Open the copied file and add the SemanticUI stylesheet and scripts, then deploy and audit.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.css"></link>
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.js"></script>
vercel --prod
The score drops to 66, and the framework isn't even used yet. Loading those files in the head alone costs a third of the perfect score and pushes TTI from 1.9 to 4.9 seconds.

Mistake two: marketing tags in the head
Next come third-party scripts, the kind a marketing department requests: Google Analytics for traffic measurement plus Facebook tracking for a campaign. Both snippets land in html.js, again inside <head> before the closing tag.
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-4369823-4"></script>
<script
dangerouslySetInnerHTML={{ __html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-4369823-4');
`}}
/>
<script
dangerouslySetInnerHTML={{ __html: `
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '3180830148641968');
fbq('track', 'PageView');
`}}
/>
<noscript><img height="1" width="1" src="https://www.facebook.com/tr?id=3180830148641968&ev=PageView&noscript=1"/></noscript>
After a push to Vercel and another Lighthouse run:
vercel --prod

The score is now 51. One framework and two small scripts have taken 49 points off the total — nearly half the starting score.
Mistake three: unoptimized images
Images are frequently the largest contributor to page bloat, so give them room to work. Add 100 different images to the page, hot-linked from https://placeimg.com rather than served from the site's own origin, in a loop over 100 instances in index.js:
const IndexPage = () => {
const items = []
for(var i = 0; i < 100; i++) {
const url = `http://placeimg.com/640/360/any?=${i}`
items.push(<img key={i} alt={i} src={url} />)
}
return (
<Layout>
// ...
{items}
// ...
</Layout>
)
}
Every image loads with the page and blocks rendering.
vercel --prod

The result is a Lighthouse score of 17 and a TTI of 16.5 seconds. A site that started perfect has lost 83 points.
What the exercise actually shows
The point isn't that anyone would knowingly ship this configuration. It's that performance is a balance with a cost, and it doesn't arrive free with the architecture. Jamstack's genuine advantage remains caching: static files served from the edge cut Time to First Byte, which will always beat a single-origin server that generates each page on request — that head start is what makes a score of 100 reachable. A strong score still isn't proof of a good user experience, and a weak one is easy to reach without noticing. Which is why every code change deserves its own audit.



