Navigation
Let’s talk Pune, India / Independent developer
All writing

AI can build your website. But can it tune it?

Making PairMe faster by deciding what the browser should never have to download.

While modernizing PairMe, I spent today going down the rabbit hole of Next.js 16, performance, caching, Server Components, client-side JS and lazy loading.

The goal wasn't to slap “AI-powered” on another website and call it a day.

It was to make the actual product faster.

Make the video SDK wait

One of the biggest wins was lazy-loading the Stream video SDK. There's no reason to make every visitor download a heavy video SDK when most people are just browsing PairMe.

Most visitors are just browsing.Change the loading plan. Then enter a live session.
Page contentDelivered as HTML
Room controlsAvailable in the browser
Stream video SDKRequested by the browser
A browse-only visit still gets the video code.

The SDK is requested with the first page even though this visitor has not chosen a call.

A conceptual request plan, not a network trace. No bundle sizes, timing measurements, or savings are invented. “Browse rooms” models a fresh visit.

The production run

After the changes, the production build hit:

CategoryScore
Performance100
Accessibility100
Best Practices77
SEO100

Ask what actually needs to ship

The interesting part is that the biggest performance improvements weren't some magical Next.js switch.

They came from asking simple questions:

  • What actually needs to run in the browser?
  • What can stay on the server?
  • What needs to be cached?
  • What can load later?
  • What JavaScript can I simply not ship?

AI can absolutely build you a website.

But making that website fast, efficient and pleasant to use is a different problem.

That's where the engineering starts.

More on PairMe's live-session boundary.