Understand a slow page before optimising it
A page seems slow: how can you identify the wait that affects users and measure a correction's effect under the same conditions?
Describe what seems slow
'The page is slow' can describe several situations. After clicking a filter, for example, the list stays unchanged for a few seconds. Is the server response late, or is the browser struggling to display received data? I start by recording what the user is waiting for and when they can continue.
Context matters too: first visit or subsequent navigation, data volume, device and connection. A measurement on a development computer does not represent every use. It can still serve as a comparison point if its conditions are kept throughout the analysis.
Build a reproducible case
- Choose a precise URL and action.
- Use a dataset you can retrieve again.
- Record conditions: browser, cache, connection and environment.
- Observe several runs to identify variability.
- Keep a baseline measurement before changing the code.
A first run may include compilation or populate a cache that benefits later runs. Repeating the journey helps identify that difference. If the wait occurs only on a first visit, that condition must be part of the case studied.
Separate data from its display
The browser lets you examine network requests and the work done to display their results. If the response arrives late, investigate the server-side path or external dependencies. If data is already present but the interface responds slowly, client rendering or processing deserves examination.
These leads are hypotheses to confirm. Adding a cache, for example, is worth trying if the wait comes from repeated server-side work. A limited intervention lets you compare its effect with the baseline and revert if it brings no benefit.
Compare the result and trade-offs
After the change, I suggest repeating the same conditions and journey. Does the improvement address the observed wait? Does it introduce less fresh data, different behaviour or additional maintenance cost? Measurement must remain connected to the experience you intended to improve.
This method does not guarantee that a cause will be easy to find. It does avoid multiplying simultaneous changes without knowing which one explains the result. Each step leaves a useful record for the next investigation.