BolEnglishLearn · Play · Win
Login

⚡ Software Design & Architecture · Architecture Evaluation Factors

⚡

Performance

Quality AttributeCoreModule 1

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.

💡 In practice

A checkout page taking 1 second is better than one taking 12 seconds because it loads thousands of unnecessary records.

🖼️ CONCEPT PICTURE
A picture to help remember Performance
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.

💡 Learn🛠️ Apply🎯 Check

💡 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

1
Measure first
Profile the real system before you change anything. Find the one slow step that actually matters instead of guessing.
2
Do less work
Fetch only the rows and columns you need. Avoid pulling thousands of records to show ten.
3
Cache repeated results
Data read often but changed rarely can be served from memory or a CDN instead of rebuilt every time.
4
Move heavy work off the request
Send emails, reports and image processing to a background queue so the user is not kept waiting.

⚠️ 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.
⚠️ Common mistake: Optimizing by guessing — rewriting code that was never the bottleneck. Always measure, then optimize the part that is actually slow.

🎯 Quick check

Score: 0/3

Three questions to test the idea.

  1. 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. 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. 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.

🔑 Key terms

Latency
How long one request takes to answer.
Throughput
How many requests the system can handle per second.
N+1 query
One query to get a list, then one more per item — a very common slowdown.
Caching
Keeping a ready-made answer so you don't rebuild it every time.

✅ Review checklist

📊 Your progress

0%
Mark this topic learned to track it.
Saved in this browser.
🚀 Got it?
Mark it learned and move to the next topic.
Next topic →