Performamnce Optimisation Flashcards

(10 cards)

1
Q

What is database query optimization?

A

Techniques to improve query performance: use indexes, avoid SELECT *, limit result sets, optimize joins, use query execution plans, denormalize when needed, partition large tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is lazy loading?

A

Lazy loading defers loading resources until they’re needed. Reduces initial load time and resource usage. Used for images, modules, data. Trade-off: potential delay when resource is accessed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is prefetching?

A

Prefetching loads resources before they’re needed based on predictions. Reduces perceived latency. Examples: browser DNS prefetch, link prefetch, data prefetch in applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is connection keep-alive?

A

Keep-alive reuses TCP connections for multiple requests instead of creating new connections. Reduces overhead of TCP handshakes. Controlled by HTTP headers and timeouts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is compression?

A

Compression reduces data size for transmission and storage. Gzip/Brotli for text, image formats for pictures, video codecs. Trade CPU for bandwidth. Improves transfer speed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is content minification?

A

Minification removes unnecessary characters from code (whitespace, comments) without changing functionality. Reduces file size for JavaScript, CSS, HTML. Improves load times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is pagination?

A

Pagination divides large result sets into smaller pages. Reduces memory usage, improves response time, better UX. Implementation: offset-based (simple) or cursor-based (consistent).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is database connection pooling?

A

Maintaining a pool of reusable database connections instead of creating new ones per request. Reduces connection overhead and limits concurrent connections to prevent database overload.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is asynchronous processing?

A

Async processing handles operations without blocking. Tasks run in background while main thread continues. Improves responsiveness and throughput. Used for I/O operations, long-running tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is read-through vs write-through cache?

A

Read-through: cache automatically loads from DB on miss. Write-through: writes go to cache, then synchronously to DB. Both simplify application code but have different consistency/performance trade-offs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly