Tell me about a time you significantly improved the performance of a system
cs-mid-007
Your answer
Answer as you would in a real interview — explain your thinking, not just the conclusion.
Model answer
Structure the answer with STAR. Situation: a nightly reporting job was taking 40+ minutes and causing timeout errors in production. Task: reduce it to under 5 minutes without changing the report outputs. Action: profiled with dotnet-trace and BenchmarkDotNet — found 90% of time was in EF Core issuing N+1 queries inside a loop. Replaced the loop with a single join query and a dictionary lookup. Added a compound index on the most-filtered columns. Result: job ran in under 2 minutes. The key insight: measure before optimising — intuition about bottlenecks is almost always wrong. Show that you understand the difference between algorithmic complexity (big-O) and practical hot paths (cache misses, I/O round-trips, GC pressure).
Follow-up
How do you measure performance in a .NET application? What tools do you reach for first?