Web performance engineers often fall into the trap of believing that smarter scheduling of existing code is easier than deleting it. A new analysis published on infrequently.org challenges this assumption, arguing that for most teams, removing code is not only more effective but significantly easier to maintain than reordering it. The piece, written by a colleague of Marko IliΔ, suggests that while scheduling optimizations are technically brilliant, they are operationally fragile and often mask deeper architectural issues.
The Hidden Cost of Scheduling
The core argument rests on the idea that both code removal and scheduling require a deep understanding of page behavior, meaning the primary investment cost is identical. However, the downstream consequences diverge sharply. Deferred bytes still contend for bandwidth, potentially delaying critical above-the-fold resources in ways that are difficult to predict. Worse, late-fetched JavaScript generates main-thread 'thuds' from background compilation, causing Input Latency (INP) issues that are maddening to debug due to their stochastic nature. Unlike bundle size, which can be clamped with simple CI checks, maintaining optimal code ordering requires exquisite regression-prevention discipline across teams.
Organizational Friction and 'Bun Fights'
In large organizations, scheduling creates a 'tragedy of the commons' where feature teams fight for priority loading slots. The article describes 'bun fights' where Team Aβs desire to preload their code directly degrades Team Bβs experience, particularly on slow networks or low-end devices. This dynamic forces managers into strident advocacy for their specific features, leading to a bloated critical path that no one owns. Without strict code size budgets, teams often rely on 'preloading' hacks that hide in plain sight, ballooning costs for all users while offering no durable performance gains.
Scheduling Is for Closers
The author posits that scheduling optimizations are 'special occasion food' suitable only for teams that have already achieved Level 4 Performance Management Maturity. These teams possess strict size budgets, battle-tested launch gates, and deep system knowledge. For the majority of teams, investing in scheduling before mastering code removal is a management error. Removing code sets the stage for future scheduling wins by reducing complexity, whereas relying on scheduling to fix bloat leads to brittle systems that break with every new feature.
Key Takeaways
- Prioritize deleting code and moving work to the server before attempting to reorder resources.
- Scheduling hacks create organizational friction and 'bun fights' between feature teams.
- Deferred code still consumes bandwidth and can cause unpredictable main-thread stalls.
- Only teams with strict regression prevention and size budgets should focus on scheduling.
The Bottom Line
Stop trying to outsmart the browser with clever scheduling tricks. If your bundle is fat, delete the fat. Scheduling is a luxury for teams that have already done the hard work of code reduction.