Engineering loops
The sub-50 ms page-load loop
A performance optimization workflow for coding agents that uses one repeatable benchmark and stops only when every target page meets the threshold.
Source recipe
Copyable Markdown
# The sub-50 ms page-load loop
## Purpose
A performance optimization workflow for coding agents that uses one repeatable benchmark and stops only when every target page meets the threshold.
## Prompt
```text
Continue optimizing the code for speed. After each significant change, measure page-load performance across every page under the same repeatable test conditions. Continue until every page loads in under 50 ms.
```
## When To Use
Use this when a product has a defined set of routes, a stable performance harness, and a 50 ms target that maps to a specific metric and environment.
## Workflow
- Define the exact metric, routes, test environment, warm-up behavior, and number of benchmark runs.
- Capture a baseline for every target page before making changes.
- Make one significant optimization, rerun the same benchmark, and inspect regressions across all routes.
- Continue until every page meets the threshold under the original test conditions.
## Verifier
Every page loads in under 50 ms.
Use the same benchmark and confirm there are no regressions.
## Notes
The fixed harness prevents performance work from turning into anecdotal tuning. Measuring every route after each change catches local wins that quietly slow down another page.
Page load can mean server response, render completion, or a browser timing metric. Name the metric and hardware explicitly so the 50 ms target is reproducible and meaningful.
## Source
- Source: Forward Future Loop Library
- Author: Matthew Berman
- Published: 2026-06-12
- Modified: 2026-06-17
- URL: https://signals.forwardfuture.ai/loop-library/loops/sub-50ms-page-load-loop/