0
0
NextJSframework~8 mins

Parallel routes (@slot) in NextJS - Performance & Optimization

Choose your learning style9 modes available
Performance: Parallel routes (@slot)
MEDIUM IMPACT
Parallel routes with @slot affect how quickly multiple UI sections load and render simultaneously, improving perceived page speed and interaction readiness.
Loading multiple independent UI sections on the same page
NextJS
export default function Page({ sidebar, mainContent, footer }) {
  return (
    <>
      {sidebar}
      {mainContent}
      {footer}
    </>
  )
}
Loads sidebar, main content, and footer routes in parallel, allowing browser to render visible parts faster and independently.
📈 Performance GainReduces LCP by 150-400ms by parallelizing data fetching and rendering, improving perceived load speed.
Loading multiple independent UI sections on the same page
NextJS
export default function Page() {
  return (
    <>
      <Sidebar />
      <MainContent />
      <Footer />
    </>
  )
}
All components load sequentially in the main route, blocking rendering until each finishes, delaying Largest Contentful Paint.
📉 Performance CostBlocks rendering until all components load, increasing LCP by 200-500ms depending on content size.
Performance Comparison
PatternDOM OperationsReflowsPaint CostVerdict
Sequential route loadingSingle DOM tree built after all data loadsMultiple reflows as components mount sequentiallyHigh paint cost due to delayed content[X] Bad
Parallel routes with @slotMultiple smaller DOM trees built independentlyFewer reflows as components render in parallelLower paint cost with faster visible content[OK] Good
Rendering Pipeline
Parallel routes split the page into multiple route segments that fetch and render independently. This allows the browser to start painting visible UI parts sooner without waiting for all data or components to load.
Data Fetching
Rendering
Paint
Composite
⚠️ BottleneckRendering stage can be blocked if routes load sequentially or depend on each other.
Core Web Vital Affected
LCP
Parallel routes with @slot affect how quickly multiple UI sections load and render simultaneously, improving perceived page speed and interaction readiness.
Optimization Tips
1Use @slot to define parallel routes for independent UI sections.
2Parallel routes reduce blocking time and improve Largest Contentful Paint.
3Avoid sequential loading of large components to prevent render delays.
Performance Quiz - 3 Questions
Test your performance knowledge
How do parallel routes with @slot improve page load performance in Next.js?
ABy delaying rendering until all data is fetched sequentially
BBy combining all components into a single large bundle
CBy loading multiple UI sections concurrently, reducing blocking time
DBy removing all CSS to speed up painting
DevTools: Performance
How to check: Record a page load in DevTools Performance panel. Look for multiple network requests and rendering tasks happening concurrently rather than sequentially.
What to look for: Shorter gaps between first content paint and Largest Contentful Paint, and overlapping network and rendering tasks indicating parallel loading.