#Performance
16 posts tagged with this topic. ← All tags
-
The query planner: why the same query runs differently on different data.
PostgreSQL's query planner chooses how to execute a query based on table statistics. Understanding that process explains why query performance changes as data changes.
-
Connection pooling math: how to calculate the right pool size.
More connections isn't always better. Database connections are expensive resources, and the optimal pool size has a formula — here's how to work it out.
-
Partial indexes: smaller, faster indexes for filtered queries.
A partial index only indexes rows that match a condition. For queries that always filter on a specific value, a partial index is smaller, faster, and cheaper to maintain.
-
Index-only scans: the PostgreSQL optimization that skips the heap.
When all the columns a query needs are in an index, PostgreSQL can answer the query from the index alone — without touching the table at all.
-
The N+1 problem in GraphQL: DataLoader and the batching fix.
Every GraphQL resolver that fetches related data naively creates N+1 database queries. DataLoader solves this with batching and caching within a request.
-
Protocol buffers: binary serialization that's smaller and faster than JSON.
Protocol Buffers encode structured data into a compact binary format. Here's how the encoding works and why it's significantly more efficient than JSON.
-
Connection pooling at scale: why PgBouncer exists.
How PgBouncer pools database connections to handle high concurrency, the three pooling modes, and how to configure it.
-
HTTP/2 and HTTP/3: what changes for your app.
How HTTP/2 multiplexing and HTTP/3's QUIC transport improve performance, and what these protocol changes mean for your application design.
-
WebAssembly: running near-native code in the browser.
How WebAssembly works, how to compile Rust and C to Wasm, and when it makes sense to reach for it.
-
CDN architecture: what edge nodes do and how cache invalidation works.
How CDN edge nodes cache and serve content, the difference between push and pull CDNs, and how cache invalidation propagates.
-
The HTTP cache: Cache-Control, ETags, headers that prevent stale data.
How browser caching and CDN caching work through HTTP headers, and how to configure them correctly for different types of content.
-
Service workers: offline capability without a native app.
How service workers intercept network requests to enable offline functionality, background sync, and push notifications.
-
Web Workers: offloading computation without blocking the main thread.
How Web Workers move CPU-intensive tasks off the main thread, with examples for parsing, image processing, and communication patterns.
-
Edge rendering: the latency advantage and the constraints.
How edge rendering works, where it reduces latency, and what you give up compared to traditional server rendering.
-
Cold starts: what causes the delay and how to reduce it.
What happens during a serverless cold start, why it adds latency, and practical techniques to minimize the impact.
-
React Native performance: the FlatList settings that stop jank.
FlatList is the standard way to render large lists in React Native, but its default settings aren't optimal for all cases. The props that make the biggest performance difference.