Performance
Performance capstone: multiple-choice synthesis
The whole track collapses into one loop: profile, classify the dominant cost, fix it at the right layer, verify, enforce. Each question hands you a symptom that touches two or three units at once and asks for the first move a senior engineer makes.
Confirm you can run the cross-cutting decision the track was built for: refuse to guess, find the one cost that dominates, fix it where it actually lives, and prove the fix with numbers under the same load.
A checkout page feels slow. A senior engineer is told the JSON serializer is 'obviously' the bottleneck. What do they do first, and why?
A flame graph shows one function dominating CPU, and within it the time is spent in memory allocation and the subsequent GC. Where does the durable fix live?
A dashboard endpoint issues 1 fast query to list 50 orders, then 50 more queries to fetch each order's customer. Each query is 2 ms. Profiling the queries themselves shows nothing slow. What is the dominant cost and the right fix?
An ingestion service makes one network call per event with ~3 ms of fixed per-call overhead (connection, auth, serialization) and ~0.1 ms of useful work. Throughput is capped. Batching events into groups of 100 is proposed. What is the real tradeoff to state up front?
A product page added a 280 KB (gzipped) date-picker library to ship one calendar widget. Lighthouse TTI regressed on mid-tier mobile. Server response time is unchanged. Where is the cost and how do you keep it from recurring?
You shipped a fix, p99 looks better on your laptop, and the ticket is ready to close. What still has to be true before the work is actually done, per the track's loop?
Every question reduced to the same loop the track is built on: profile before you guess (Amdahl caps the payoff of optimising the wrong thing), classify the dominant cost into its shape — allocation/GC, N+1 round-trips, per-op fixed cost, client CPU bytes — fix it at the layer where that cost actually lives, then verify under identical load and enforce the gain in CI. Performance is not a project you finish; it is this loop you keep running.