Critical Rendering Path
debt(d5/e5/b5/t5)
Closest to 'specialist tool catches it' (d5). Critical Rendering Path issues are detected by performance audit tools like Lighthouse, WebPageTest, or Chrome DevTools Performance panel. These are specialist tools that analyze render-blocking resources, not default linters. The term's detection_hints confirms automated detection is 'no' for standard tooling, requiring specialized performance profiling.
Closest to 'touches multiple files / significant refactor in one component' (e5). Fixing CRP issues requires extracting critical CSS, restructuring script loading across templates, potentially modifying build pipelines to inline above-the-fold CSS, and adding async/defer attributes across multiple HTML templates. The quick_fix suggests reviewing documentation and applying to project context, implying multi-file changes rather than a one-line fix.
Closest to 'persistent productivity tax' (b5). CRP optimization affects all page templates and frontend asset delivery. The applies_to shows it spans web and cli contexts. Every new CSS addition or script inclusion must consider render-blocking impact. It's not architectural (b7-9) since it doesn't define system shape, but it creates ongoing friction when adding frontend resources across the codebase.
Closest to 'notable trap' (t5). The misconception field explicitly states developers believe 'faster JavaScript is the key to faster page loads' when CSS is actually more often the render-blocking bottleneck. This is a documented gotcha that most frontend developers eventually learn, but initially contradicts the common intuition that JS optimization is paramount.
Also Known As
TL;DR
Explanation
The browser: parses HTML into the DOM, parses CSS into the CSSOM, combines them into the Render Tree, calculates layout (reflow), and paints. Render-blocking resources (CSS, synchronous JS in <head>) delay First Contentful Paint. Optimisation strategies: inline critical CSS, defer non-critical CSS, use async/defer on scripts, preload key resources, and minimise render-blocking bytes. Every millisecond removed from the critical path improves perceived load time.
Diagram
flowchart TD
HTML[HTML bytes] --> DOM[DOM Tree]
CSS[CSS bytes] --> CSSOM[CSSOM Tree]
DOM & CSSOM --> RENDER[Render Tree]
RENDER --> LAYOUT[Layout<br/>position and size]
LAYOUT --> PAINT[Paint<br/>pixels to screen]
JS[JavaScript] -->|may block| DOM
JS -->|may modify| CSSOM
BLOCK[Render-blocking resources<br/>delay first paint] -.->|eliminated by| DEFER[async defer<br/>inline critical CSS]
style BLOCK fill:#f85149,color:#fff
style DEFER fill:#238636,color:#fff
Common Misconception
Why It Matters
Common Mistakes
- Loading all CSS in one large bundle — prevents any rendering until the full file downloads.
- Synchronous <script> tags in <head> without async/defer — blocks HTML parsing.
- Not inlining critical above-the-fold CSS — forces a render-blocking external CSS request.
- Large render-blocking third-party scripts (analytics, chat widgets) loaded synchronously.
Code Examples
<!-- Render-blocking resources in <head>:
<head>
<link rel="stylesheet" href="all-styles.css"> <!-- Blocks rendering -->
<script src="app.js"></script> <!-- Blocks HTML parsing -->
<script src="analytics.js"></script> <!-- Blocks HTML parsing -->
</head>
<!-- Optimised critical path:
<head>
<!-- Inline only critical above-fold CSS (< 14KB) -->
<style>/* critical CSS here */</style>
<!-- Load full CSS non-blocking -->
<link rel="preload" href="all-styles.css" as="style" onload="this.rel='stylesheet'">
</head>
<body>
<!-- Content -->
<!-- Scripts at end with defer -->
<script src="app.js" defer></script>
<script src="analytics.js" async></script>
</body>