Tags

Performance

Performance

0 lessons
2 system designs
1 behavioral interview
25 community items

performance

Community

25 items
Code Snippet

bisect Instead of sort() on Every Insert (Python)

I had a leaderboard insert loop running list.append + list.sort. Swapping to bisect.insort cut the loop from 4.2s to 0.14s on 50k inserts. The 5-line rewrite plus the keyed variant is here.

Python
binary-search
performance
sorting

935

21

4.4 (10)

May 14, 2026

by @sarahwilson

Code Snippet

Streaming Aggregations With a Single Pass (JS)

Welford's online algorithm for mean and variance, plus a 30-line streaming p99 estimator. The version I use when the data does not fit in memory or arrives over WebSocket.

JavaScript
stream-processing
performance
code-template

851

26

4.2 (12)

May 9, 2026

by @ryancastillo

Article

Server Components vs Client Components: When Each Wins

Server Components are the new default; Client Components are for interactivity and state. The boundary between them is where most beginner Next.js bugs live.

react
frontend
performance
hooks

245

6

4.0 (10)

May 6, 2026

by @mianair

Article

Generators, yield, and Lazy Pipelines

Generators turn a 4GB log-processing job into a 50MB one without changing the consumer code. Here is the mental model, the pipeline pattern I reuse, and the four traps that make hand-rolled generators leak.

py-generators
py-itertools
iterators
performance
fundamentals

847

16

4.4 (13)

May 4, 2026

by @sofiacollins

Interview Experience

Data Engineer Loop: The SQL Test That Wasn't Just SQL

A data engineering loop at a Series C analytics company. The SQL round looked like a standard SQL test. It was grading something else entirely.

sql
interview-prep
system-design-interview
behavioral-interview
performance

818

22

4.4 (9)

Apr 29, 2026

by @aishataylor

Article

N+1 Queries: Detection and Prevention

What an N+1 query is, why ORMs hide them, the four ways to fix them, and the simple logging change that has caught every N+1 I have shipped since I added it.

database
performance
query-optimization
backend
debugging

806

11

4.5 (10)

Apr 23, 2026

by @adaezeaziz

Code Snippet

IntersectionObserver Batched With rootMargin

On a feed with 200 cards, creating one IntersectionObserver per card pushed our scroll frame to 14ms. This is the single shared observer with `rootMargin` prefetch and a batched callback that brought it back to 4ms.

JavaScript
intersection-observer
js-dom
performance
frontend

500

9

Apr 9, 2026

by @emmakim

Article

Image Optimization on the Modern Web

Pick the right format, ship the right size, reserve the right space, and lazy-load below the fold. Most image perf wins live in the basics, not in fancy libraries.

frontend
performance
html-elements
html-media

1k

28

4.1 (11)

Mar 28, 2026

by @camilarao

Code Snippet

Batch and Coalesce Fetch Calls in React

Twenty cards on a page each ask for /api/users/:id and you cut server load 20x with this 30-line dataloader. The batch fires on the next microtask; same id never goes over the wire twice.

JavaScript
batched-dispatch
react
performance

813

22

4.4 (10)

Mar 25, 2026

by @sophiesharma

Article

asyncio Explained Without the Jargon

asyncio is a cooperative scheduler for I/O-bound code. async def marks a pause-able function, await is the pause point, and the event loop runs whichever coroutine is ready.

py-asyncio
concurrency
coroutines
performance
interview-prep

1.1k

27

4.4 (12)

Mar 16, 2026

by @aishasantos

Article

Core Web Vitals Without the Buzzwords

LCP, CLS, INP measure three real user-felt experiences: load, stability, responsiveness. Treat them as field truth, not Lighthouse scores to game.

performance
frontend
monitoring
html-elements

1k

17

4.3 (11)

Mar 14, 2026

by @sarahgarcia

Article

The GIL: What It Actually Blocks

The GIL blocks parallel Python bytecode and nothing else. I/O, well-behaved C extensions, and multiprocessing all sidestep it. Here is how I tell GIL-bound code from code that just feels slow.

py-gil
concurrency
performance
py-multiprocessing
fundamentals

715

19

4.3 (11)

Mar 14, 2026

by @freyadiallo

Article

Garbage Collection in V8 Without the Mystique

The working engineer's tour of V8 GC: generational hypothesis, Scavenger for young space, Mark-Sweep-Compact for old, incremental marking, Orinoco's concurrent collector, and what application code can actually do.

garbage-collection
memory-management
performance
performance-optimization
fundamentals

223

1

4.2 (9)

Mar 6, 2026

by @oliviafoster

Interview Experience

Series C Hyper-Growth Loop: Speed Over Polish

A Series C hyper-growth loop where the rubric was 'can you ship next week, not in three months'. The shape, the pushback, and the offer that came in 36 hours.

startup-culture
system-design-interview
interview-prep
career
performance

751

13

4.3 (14)

Feb 22, 2026

by @maxreed

Article

SSR, CSR, SSG, ISR: Pick the Right One

Four rendering strategies, four cost profiles. Pick by data freshness and personalization needs, not by which acronym sounds most modern.

frontend
performance
react
system-design

788

25

4.3 (11)

Feb 20, 2026

by @sophiegarcia

Code Snippet

When I Stop Reaching for List Comprehensions

I love comprehensions, but I have learned the three cases where they cost more than they save: nested filtering, side effects, and big intermediate lists. Here is the pattern I switch to in each.

Python
py-list-comprehensions
py-generators
performance

628

4

3.9 (9)

Feb 11, 2026

by @ayomidegray

Interview Experience

Frontend Engineer Loop at a Design-Centric Company

A 5 round frontend loop at a design-centric Series C SaaS. The CSS round, the rendering round, the design-system round, and what each one was actually grading.

frontend
css-flexbox
react
performance
interview-prep

166

2

4.3 (14)

Feb 10, 2026

by @theokone

Article

MongoDB Aggregation Pipelines, by Example

Match, group, lookup, project, the four stages I use 90% of the time. Real pipelines for funnel analysis, leaderboard, and a one-stage join, with the gotchas that surprise SQL refugees.

database
nosql
query-optimization
data-modeling
performance

582

6

4.5 (11)

Feb 1, 2026

by @fatimapark

Article

CI/CD Pipelines: Stop Letting Them Rot

The maintenance habits that have kept my pipelines fast and trusted for years, the seven categories of rot I have actually seen, and the budget I run so the pipeline is treated as production code.

reliability
craftsmanship
performance
code-organization

1k

10

4.1 (9)

Jan 21, 2026

by @sanjayward

Article

Connection Pooling, PgBouncer, and the Prisma Trap

What a connection pool actually does, why your Postgres falls over at 200 connections, where PgBouncer sits, and the prepared-statement bug that bites every Prisma team that adds it the wrong way.

database
performance
backend
scalability
reliability

322

2

4.3 (13)

Jan 8, 2026

by @ananyanakamura

Article

LLM Fundamentals: Tokens, Context, and Cost

Tokens are not characters or words. Context is not free. Cost is per-token in both directions. The three fundamentals that determine 80% of how an LLM-backed feature performs and bills.

machine-learning
openai
performance
backend
ai-safety

455

4

4.1 (9)

Dec 28, 2025

by @valentinamwangi

Article

AWS Lambda Cold Starts: What Actually Helps

Where the cold-start time really comes from, the four levers that have moved my p99 down by hundreds of milliseconds, and the optimizations I have tried and abandoned because they did not pay back.

serverless
performance
backend
reliability

596

18

4.3 (10)

Dec 23, 2025

by @liamsuzuki

Code Snippet

Debounce With Leading + Trailing Edges and a cancel() Method

The trailing-only debounce in every tutorial works for search inputs and breaks on click handlers. Here is the lodash-style version with leading edge, cancel(), and flush(), in 30 lines.

JavaScript
throttling
performance
code-template

915

13

4.4 (8)

Dec 18, 2025

by @hiroshiward

Article

The Browser Rendering Pipeline in Five Stages

Parse, style, layout, paint, composite. Knowing which stage your code blocks is what turns DevTools performance traces from noise into action.

frontend
performance
html-elements
css-positioning

974

26

4.4 (10)

Dec 3, 2025

by @omarbennett

Article

Database Indexes Explained with Real EXPLAIN Output

What an index actually is, how the planner picks one, and the EXPLAIN output I read every day. Postgres examples, real numbers, and the three indexing mistakes I keep finding in code review.

database
database-indexing
sql
query-optimization
performance

1.1k

24

4.4 (16)

Dec 2, 2025

by @theowatanabe