Notes

A 3D hero that waits its turn

· Samuel Deangelo

The opening of our home page is a small film: an estate of tangled systems is surveyed, rebuilt and put into service as you scroll. It is drawn live in WebGL, and on a mid-range phone it was costing us dearly. Lighthouse scored the page 54 for performance, with nearly two seconds of the main thread blocked before anyone could tap a thing.

A buyer who opens our link from an email on the train does not wait two seconds to be impressed. So the film had to earn its place.

Paint first, perform second

The page now opens on a still of the film's first frame, compressed to under 50 KB for phones. The headline, the offer and the website check are all readable straight away. The 3D scene loads on the visitor's first scroll, touch or pointer move, then fades in over the still and pushes the camera into the same framing, so the hand-over is invisible.

Analytics and error monitoring now start once the browser is idle, smooth scrolling loads after the page is interactive, and the reveal animations use the browser's own animation engine instead of a library.

What it changed

Shared JavaScript on first load fell from 145 KB to 88 KB. Main-thread blocking on a phone fell from 1.7 seconds to under 0.1. The home page now scores 93 to 95 on a phone and 100 on desktop, with accessibility, best practices and search at 100.

The same changes went into two client sites the following day: African Base went from 48 to the high 80s, Restoring Lives from 76 to the high 80s.

Next noteWhat a website gives away in ten seconds
Check your siteBook a diagnosis