4 Expert pathLesson 5 of 8 6 min read

Éclair performance: staying at 100 out of 100

  1. 1. Éclair's architecture
  2. 2. Local development and testing
  3. 3. Customize the theme templates
  4. 4. Nginx, VPS, proxy and CDN: deploy Éclair
  5. 5. Éclair performance: staying at 100 out of 100
  6. 6. Migrate from WordPress or Wix
  7. 7. Advanced security and maintenance
  8. 8. Scaling Éclair in an agency
Contents
  1. What Éclair already does
  2. How do you measure Éclair performance?
  3. Response time on shared hosting
  4. Images: the first thing to watch
  5. Fonts, custom CSS and videos
  6. Third-party scripts and audience measurement
  7. Do you need a CDN?
  8. The checklist
  9. Key points
  10. Going further
  11. Frequently asked questions

Éclair performance doesn't depend on any cache plugin to configure: it's built into the CMS. Measured locally, the demo site scores 100 in all four Lighthouse categories. This lesson explains where that result comes from, how to measure it on your own site and which decisions bring it down: images, fonts, CSS, videos, scripts and hosting.

What you'll be able to do

Measure correctly

Lighthouse, PageSpeed Insights and server response time.

Keep pages light

Images, fonts, custom CSS and videos.

Avoid the pitfalls

Third-party scripts, audience measurement and CDN caching.

What Éclair already does

Éclair measurements: Lighthouse 100 in all four categories, page weight and server response time
Published Éclair performance measurements, taken locally on the demo site.
MechanismEffect
static cache: index.php serves the page without loading the application0.7 ms server response time, measured locally
CSS inlined in the page: 17 to 23 KB, 5 to 6 KB compressedno render-blocking stylesheet
system fonts, or a single preloaded heading fontno layout shift
WebP images from 480 to 1600 px, explicit dimensions, lazy loadingthe main element displays quickly
a single deferred public script: 2.4 KB, 1.2 KB compressedthe browser is never blocked
Brotli or Gzip, one-year browser caching, versioned ?v=… URLslater visits download nothing again
ETag and 304 responsesan unchanged page isn't sent again

The repository also publishes its measurements in tests/fixtures/lighthouse-1.8.0.json: mobile Lighthouse, median of three runs, on the home page and a post of the reference site, a sales page, then the home page dressed in the Nocturne, Riviera, Press and Poster directions. The result everywhere: 100 in all four categories, an LCP of 779 to 885 ms, a CLS of 0 and a TBT of 0 to 17 ms.

How do you measure Éclair performance?

  1. Lighthouse in Chrome: open the page in a private window, because extensions skew the measurement, then open the developer tools and the Lighthouse tab. Choose mobile mode and all four categories, then run the analysis.
  2. PageSpeed Insights (pagespeed.web.dev): the same analysis, run from Google's servers, with real data from Chrome users when your site has enough of it.
  3. On the command line, to track changes from one version to the next.
  4. The server response time, which Lighthouse buries among the rest: measure it separately with curl.
# Mobile Lighthouse (Node.js 22 or later), report opened in the browser
npx lighthouse https://exemple.fr/ --only-categories=performance,accessibility,best-practices,seo --view

# After a change: 1st call (page generated), then 2nd call (static cache)
curl -s -o /dev/null -w 'TTFB : %{time_starttransfer} s\n' https://exemple.fr/
curl -s -o /dev/null -w 'TTFB : %{time_starttransfer} s\n' https://exemple.fr/

Response time on shared hosting

The 0.7 ms figure is measured locally. On real hosting, network latency and PHP startup come on top, since even the fast path goes through index.php. Three levers remain in your hands:

After every change, Éclair clears the whole cache: the first visit to each page regenerates it, once. The following visits go through the fast path again.

Images: the first thing to watch

Éclair performance mostly comes down to images, since everything else is already tuned. Éclair shrinks each original to 2000 px, re-encodes it, then creates WebP versions at 480, 800, 1200 and 1600 px, keeping only those smaller than the original. A few habits are enough:

Fonts, custom CSS and videos

Fonts. Classic themes only use system fonts, with no download at all. An art direction adds a single heading font of 12 to 27 KB: your server downloads it once from Fontsource, stores it in media/fonts/, then the site preloads it with font-display: optional, with no layout shift. Don't add any other font: custom CSS strips @import rules, and the CSP refuses fonts from another domain.

Custom CSS. It's inlined in every page, along with the theme: every KB you add is downloaded on every visit, with no separate caching. The cap is 64 KB, but aim for a few KB, and don't slip base64-encoded images into it.

Videos. The Video block only shows a play button: no request goes to YouTube or Vimeo before the click. On click, the site's script loads the player from youtube-nocookie.com or player.vimeo.com.

Third-party scripts and audience measurement

The public site's CSP only accepts scripts served by your domain: tag managers, chat widgets and Cloudflare Web Analytics are blocked. That's deliberate, because every third-party script costs loading time and often cookies. To follow your audience without adding anything:

A JavaScript analytics tool would force you to modify the templates and the core's CSP, both lost on every update, and then the privacy policy created at installation, which states that the site uses no tracking cookie and no third-party analytics tool.

Do you need a CDN?

Rarely. Pages, already light, leave the static cache in a few milliseconds. A CDN mainly helps with static files when your visitors are far from the server. In that case, don't cache the HTML at the CDN: Éclair couldn't clear it on every publication. The Cloudflare settings are detailed in the Nginx, VPS, proxy and CDN lesson.

The checklist

CheckWhereExpected
cache onSettings › AdvancedX-Cache: HIT on the second call
debug modeeclair-config.phpno ECLAIR_DEBUG
PHP versionhost's control panel8.3, with OPcache on
imagesMediaat least 1600 px for full width, alt text filled in
WebPsource code of a page with images.webp files in the srcset attributes
custom CSSSettings › Appearancea few KB
videosVideo blockno player before the click
third-party scriptstemplatesnone
final measurementmobile Lighthouse100 in all 4 categories, give or take a point

Key points

Going further

Frequently asked questions

Why is my score lower on PageSpeed Insights than locally?

PageSpeed Insights measures from Google's servers, with a simulated phone and network that are slower, and it's affected by your host's latency. Compare several runs and look at the server response time first.

Do I need a cache plugin or a CDN?

Éclair has no plugins and doesn't need one: the static cache is built in. A CDN is still useful for distant visitors, as long as you keep the HTML out of its cache.

Can I add Google Analytics?

Not without modifying the templates and the core's CSP, then your privacy policy. Start with Search Console and your host's statistics, which cost you no points.

Do art directions slow the site down?

They add a heading font of 12 to 27 KB, served by your site and preloaded. The four directions measured in the repository keep 100 in all four categories.

All the lessons of this path