Performance¶
We use DebugBear to monitor the site’s performance over time.
As part of the move to a monolithic Wagtail project, we set up DebugBear on the existing site ahead of launch. This allows us to review any changes in performance as part of the infrastructure and architecture changes.
Performance targets¶
We expect the monolithic application to provide better performance than the previous iteration of the site, and have set up targets to confirm that is the case.
Our Key Performance Indicator is:
Median Performance score in DebugBear Lighthouse across a selection of 3 key page templates
We monitor this score for:
- The homepage
- A sample artist page
- A sample display page
Tests run every 24 hours, retaining the median value of 5 hits, on a simulated "Mobile" (3G Fast) connection from a UK data centre, without cache.
As of June 2021, the median score is 32. As part of our work, we expect up to a 23 points increase with the following improvements (and their origin):
- Serve images in next-gen formats: +11
- Usage of Cloudflare Polish (dependent on Cloudflare Pro plan, USD20/month)
- Use HTTP/2: +10
- Switch in caching from Varnish to Cloudflare
- Efficiently encode images: +2
- Usage of Cloudflare Polish (dependent on Cloudflare Pro plan, USD20/month)
- Serve static assets with an efficient cache policy: +0
- Switch in caching from Varnish to Cloudflare
- Cloudflare configuration
The Lighthouse score is only an aggregate of other synthetic measurements. Here are actual measurements we expect to be affected by our changes:
- Document TTFB (due to page caching in Cloudflare PoP, and changes in page data fetching)
- First Contentful Paint (due to TTFB and caching improvements for static assets)
- Images weight (due to usage of Cloudflare Polish)
Performance budgets¶
We have a single performance budget set up to protect us from regressions, with a target set based on the worst-observed score in June 2021 with 15% buffer.
- The site’s Living Cities Display Page,
- should have a FCP (First Contentful Paint) at
- 3.0 seconds or less,
- on a "Fast 3G" mobile connection, (1.6 Mbps download, 150ms RTT),
- in Google Chrome 91
- with a simulated mobile CPU (4x slowdown in Chrome),
- testing from the United Kingdom (eu-west-2 AWS region)
- as measured with Lighthouse v8.0.0.