Don't trust one performance run: when 48 ms looked like 76 ms, we alternated before and after six times each
Before we add motion or features to a kids' game, we check on a simulated slow phone how long it takes from a tap until something shows on screen. If it got slower, we either drop the feature or make it lighter first.
On November 3, 2026, that number almost fooled us. Here is what happened, and how we measure now.
What we measure
Doodle Aquarium is a kids' toy where the fish you draw swim in a tank. In a Playwright end-to-end test, with Chrome's CPU slowed down 6×, we tap a tank with 24 fish and time how long until the screen reacts. We tap several times and look at the median. If it goes over the threshold, the test fails.
After features added on November 2, tap-to-screen was a median of 32–36 ms, and 44 ms with night mode, a whale and two bubbles on screen.
It looked slower after a change
On November 3, we added an "eyes" stamp and the ability to pick up and move fish while decorating. The test reported tap-to-screen going from 48 ms to 76 ms, and two to four of the performance checks failed.
The obvious reading: the new feature is heavy. But we ran the same test on the code from before the change (the last commit), and it also failed: 80 ms for night/morning and 72 ms for night with the whale. That same code had passed the day before.
So it wasn't the code that got slower. It was the computer that day. Another game, Block Land, also dropped that day from 43–46 frames per second while rotating to 30.
Before and after, alternating, six times each
A computer's speed changes over time. If you run all the "before" runs and then all the "after" runs, you can't tell whether the machine changed in between. So we ran before and after one at a time, alternating, six times each.
- Tap to screen: before 44 ms / after 44 ms (median)
- Night screen: before 56 ms / after 56 ms (median)
No difference. The new features shipped as they were.
At four runs each, there seemed to be a difference
What worried us: looking only at the first four alternating runs, before was 32–40 ms and after was 48–56 ms, which looks like a clear gap. Continuing to six runs each made it disappear.
If we had stopped at four, we might have removed the eyes stamp or the fish-moving feature for being "too heavy".
Our rules now
- When a performance test fails, first run the same test on the code from before the change. If that fails too, suspect the environment, not the code.
- To compare before and after, alternate the runs instead of batching them. At least six each.
- Look at the median. Don't decide from a single worst run.
- Treat a day's numbers as that day's numbers, and write them in the dev notes with the date.
None of this is new as statistics. But when a test turns red, the urge to fix something right away comes first. This time, the fact that the old code failed too is what stopped us.
What we still don't know
We didn't look into why the computer was slow that day, whether other apps were running or it was throttling from heat. Six runs isn't enough to detect small differences either. For now the goal is only to catch features that make things noticeably slower, so this is the number we use.
Nandemo Factory is a one-person studio in Japan that makes small browser games, with AI doing most of the work. We only write about things we built and checked ourselves, with the numbers we actually saw. Play the games in English.