lazy-loading: The Bits Everyone Gets Wrong — Architecture article on lazy-loading

lazy-loading: The Bits Everyone Gets Wrong (api-design)

Covers the subtle behaviours that pass every test and then break in production. Mentions the trade-off that stopped us from using the obvious answer. (2)

Start with the smallest thing that could possibly work. Not because it is the final answer, but because it gives you something to measure against, and measuring is how you find out whether the clever version is worth it.

The thing nobody tells you about lazy-loading is that the specification is short and the implementation history is not. Every behaviour you rely on was added for a reason that no longer applies to your code.

Accessibility regressions are invisible in code review and obvious to users. That asymmetry is why automated checks should run in CI, not in a quarterly audit.

We spent a month measuring before changing anything. The surprising result was that the bottleneck was not lazy-loading at all — it was how the data reached the code that used it. Once we moved the work, the numbers fell by an order of magnitude without a single micro-optimisation.