Runtime Performance Isn't About Faster Work: It's a Ledger of Who Runs First
Most teams treat runtime optimization as a vague effort to speed up work, but the models here show that the critical decisions are about which cost to pay and where to invest. The counting-budget interpretation of INP changes prioritization: fixing the most numerous just-over-threshold interactions beats fixing the single worst one, and the choice of yield primitive matters far less than actually reducing slice granularity. These are concrete, measurable trade-offs that any front-end team can apply to their own performance budgets.
This piece dismantles three common assumptions about runtime performance optimization. First, slicing a long task only helps when the work is not inside the handler of the interaction being measured: slicing a 1215ms hydration task cuts input delay from 1190.7ms to 49ms, but slicing a 120ms handler into 16 pieces adds 2.3ms of processing time. Second, INP is not the worst interaction; it's a high-percentile that, at 100 interactions, falls on the 3rd worst. Fixing the worst one changes INP from 506.3ms to 332.1ms because the 4th worst moves up. Third, the 50ms Long Task threshold is not the right budget for INP; the good threshold allows a slice granularity up to 126.2ms.
The article builds three zero-dependency Node scripts with 500 total invariant assertions. They establish closed-form formulas: mean input delay = g²/(2(g+o)), P98 input delay = 0.98g − 0.02o, wall-clock cost = W + (⌈W/g⌉−1)·o. The scripts show that setTimout's 4ms clamp makes it 26.7x more expensive than postTask for fine slicing, and that rAF costs jump from +0.14% at one-frame slices to +1566.7% at 1ms slices. Priority levels only buy queue length (40x speedup), not preemption, and marking everything user-blocking linearly destroys the benefit (100% inflation gives 410ms, nearly FIFO). The piece concludes with nine application scenarios and thirteen rules, emphasizing that the leader is the question: which segment (input delay, processing, presentation, or count-over-threshold) is being changed, and what is it exchanged for.
The article's self-corrections are as valuable as its conclusions: the author initially asserted that longer gaps increase mean input delay, but the simulation showed the opposite because gaps are idle windows, which directly fed the key insight that INP, as a tail metric, is insensitive to gap length.
The counterintuitive example of a 5000ms catastrophe being rated good while three 250ms interactions are poor exposes a real gap in INP: it is a counting metric, not a severity metric, so it must be paired with LoAF or long-task monitoring to catch single-user disasters.
The practical lesson that primitive choice (postTask vs setTimeout) matters only when chasing zero-long-task or within-frame goals contradicts the common advice to switch to modern scheduling APIs; the real lever is reducing g, not picking a fancier yield.
The finding that fixing the worst interaction is often the wrong first step because the next-worst slides into place has broad implications for how performance budgets are allocated in teams.
The article's insistence on accounting discipline, asking which segment is being changed and what is exchanged, is a transferable debugging methodology for any performance optimization effort.