⚡ Software Design & Architecture · Architecture Evaluation Factors
Performance
How quickly and efficiently a system performs its work.
Users should not wait unnecessarily, and the application should not waste CPU, memory, network, or database resources.
A checkout page taking 1 second is better than one taking 12 seconds because it loads thousands of unnecessary records.
💡 Picture a fast checkout line: one quick scan and you're out — not a cashier re-counting the whole shop for every single item.
💡 Why it matters
Slow systems lose users, cost more to run, and often hide deeper design problems. On the web, every extra second of wait means more people leave. Performance is a feature, not something you bolt on at the end.
🛠️ How to achieve it
⚠️ Signs of trouble
- •Pages or APIs get slower as the data grows.
- •One request quietly fires the same query hundreds of times (the N+1 problem).
- •CPU or memory stays high even with light traffic.
- •It works on your laptop but hangs under real load.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. What is the first thing to do before optimizing performance?
Answer: Measure / profile to find the real bottleneck
Measure first. Most guessed optimizations touch code that was never the slow part.
2. A page runs one query for a list, then one more for every row it shows. What is this?
Answer: The N+1 query problem
That extra query per row is the N+1 problem — fetch the related data in one go instead.
3. Data is read very often but changes rarely. What usually helps most?
Answer: Caching the result
Cache read-heavy, rarely-changing data so you serve a ready answer instead of rebuilding it each time.
