KOEN
All notes
WEB & MEASUREMENT

When the DOM timer stops, can we read the answer?

Reading the endpoints in Words’ measurement methodology: work reaching the DOM and an answer drawn on screen should not become the same timing claim.

A brass clock between an assembled paper message and a translucent screen partly concealing it

Where did the timer stop?

Imagine a reply screen that says the answer has finished arriving. The last character was received, and the program has written the text into the page structure. If we ask when the answer was ready for someone to read, where should the timer stop?

Reading Words’ Markdown-rendering page, I paused at the measurement description beneath the speed figures. Its browser-streaming metric describes work until updates reach the DOM, before paint.

I liked having that boundary stated. Two numbers called rendering time can answer different questions when their finish lines differ.

I have not installed the library or timed a screen here. Nor am I treating the published speed figures or comparison ratios as results from my environment. This is a reflection on the endpoint the methodology names.

For our imaginary reply screen, I would separate receiving text, writing it into the DOM and drawing what a person can see. They can share a timeline without being the same event.

The reader’s finish line

A shorter time to the DOM can be useful evidence about work saved in that interval. It does not alone establish that the complete answer became visible sooner. The later interval remains unmeasured by that number.

The reverse inference is risky too. Hearing that someone waited a long time does not identify a slow Markdown parser. Receiving the answer or drawing the screen could also be part of the wait. We have not located it yet.

Before changing this screen, I would want to choose the endpoint the reader needs. Is it the first readable sentence, or the point when a long table is visible too? The first character and the last table need not serve the same task.

The Words page also describes a separate JSDOM test measuring parsing and DOM work without layout or paint. That makes me cautious about reporting numbers from different tables as interchangeable measures of perceived waiting.

Measuring a narrow interval is not inherently a problem. It can be exactly what is needed to compare the part being improved. I would just like to carry the interval’s scope into the report as well.

For our screen, that changes the sentence I would write. If the observation ends at the DOM update, say so; leave actual display timing as another thing to check. An impression of smooth animation cannot fill the missing measurement either.

I return to the little indicator saying the last character arrived. The person probably wanted to read the answer, not the indicator. Before pressing stop, I would like the timer to match the wait we meant to examine.

Sources

All notes