rq.RepoQuestOpen-source field guide
VOL. 01 / CODE EXPLORATION
OPEN-SOURCE RESEARCH / FIELD GUIDE 001

A map through
unfamiliar code.

Find your way into a codebase. Follow real issues, form hypotheses, and learn by investigating.

THERQEDITIONNO. 001
GITHUB / PUBLIC REPOS
N.
vercel/next.js

The React Framework

The React Framework

View on GitHub
STARS143,260
OPEN ISSUES3,674
LANGUAGEJavaScript
DEFAULT BRANCHcanary
YOUR INVESTIGATION

Questline

MISSIONS / 3INDEX
QUEST / 01 OF 3Advanced
PERFORMANCE INVESTIGATION

The cache that held the door

Investigate why image-cache hits can wait for a full disk-LRU scan after the server starts.

A persisted cache containing thousands of files can turn an otherwise fast cache hit into a long request stall. This quest explores the trade-offs between startup work and serving requests quickly.

  1. 01Read the issue and follow its reproduction link to understand the reported behaviour.
  2. 02Locate the server-side image-cache and disk-LRU initialization code.
  3. 03Trace the startup sequence and determine when a cache hit must wait for the scan.
  4. 04Sketch an alternative that defers or reduces the blocking work.
  • Identify the code responsible for the disk-cache scan.
  • Explain why the scan delays cache hits.
  • Describe a test that would measure whether a proposed change improves startup latency.
↗
PRIMARY SOURCE / ISSUE #100179next/image: every cache HIT waits for the full disk-LRU scan after server start
OPEN ISSUE ↗
FIELD TEST / 01KNOWLEDGE CHECK

What is the central performance problem described in this issue?

TEST YOUR UNDERSTANDING

Track your progress as you investigate.