Embed Performance Deep-Dive

1 Mar 2026 · 5 min read

Adding a third-party script to your page always has a cost. Here's how the comments embed keeps that cost minimal.

Lazy Loading

The embed script weighs under 8 KB gzipped. It defers rendering until the #comments-root element enters the viewport using an IntersectionObserver. On a typical blog post the widget initialises only when the reader scrolls past the article body.

Network Requests

On first paint the widget makes a single GET to fetch the comment thread. Subsequent pages reuse a cached auth token so there is no extra round-trip for identity.

Lighthouse Impact

In lab tests the embed adds less than 50 ms to Total Blocking Time and has zero impact on Largest Contentful Paint because it loads asynchronously after the main content.

Performance (lab)
  FCP: 0.8 s
  LCP: 1.2 s
  TBT: +48 ms (from embed)
  CLS: 0.00

Preconnect Hint

For the fastest cold start, add a preconnect hint in your <head>:

<link rel="preconnect" href="https://api.example-comments.com">

Comments