Skip to content
Skein

performance

Performance

How to find why software is slow and actually make it faster — measure first, then fix the real bottleneck instead of guessing.

9 units·85 lessons·~50 h

Start track →
00

Start from zero

Before the senior material: what performance work even is, and the handful of words the rest of the track assumes you already know.
01

Profile first: measure where time actually goes

Why intuition fails more than half the time, how Amdahl's law caps every speedup you can ship, and the measurement loop senior engineers run before touching a line of code.
02

Hot paths: diagnosis, shapes, and fixes

A hot path is a function the profiler finds over and over. Five shapes (CPU, allocation, cache, lock, syscall), one diagnostic loop, and the hardware counters that resolve ambiguity — from junior intuition to senior TMA.
03

Cache vs big-O: when the textbook lies

An O(N) scan on contiguous memory routinely beats an O(log N) tree traversal — because cache lines, prefetchers, and branch prediction dominate wall-clock time in ways big-O cannot model.
04

Garbage collection: pause budgets, allocation pressure, and the tail you don't see

GC pause is the symptom; allocation rate is the cause. Reduce allocations first, tune the collector second, switch collectors last.
05

N+1: one logical operation, many round-trips

Why one screen renders into 200 database queries, the four fix patterns (JOIN, IN, batch-loader, prefetch) with their tradeoffs, and how the same problem repeats across REST, gRPC, and microservice fan-out.
06

Batching: amortize fixed cost per operation

Per-op fixed cost dominates? Batch. Window = batch size and max wait; bigger batches buy throughput, charge tail-latency.
07

Bundle budgets: the bytes your users actually pay for

JS bundle bytes = parse + compile + execute on the user's CPU. Set per-route budgets, enforce at CI, monitor with RUM.
08

Putting it together: performance as a discipline, not a project

Seven tools, one loop. Profile, classify, fix, verify, enforce. The loop is what makes performance a durable property of the team, not a one-time project.

Build with this track

Guided projects that exercise what you learn here.

◆ Projects

At-least-once job queue

Build a durable job queue on Postgres with visibility timeouts and idempotent consumers, so a crashed worker never drops a job.

◆ Projects

Bloom filter

Build a space-efficient probabilistic set that answers membership queries in O(1) with a tunable false-positive rate — and understand exactly why it can never produce false negatives.

◆ Projects

Cache stampede lab

Reproduce a thundering-herd cache miss under load, then kill it with single-flight and early-expiry recomputation.

◆ Projects

Circuit breaker

Build a circuit breaker that stops hammering a failing dependency, probes it safely with a half-open state, and resets automatically — the exact pattern that keeps microservice cascades from turning one bad node into a full outage.

◆ Projects

Collaborative cursors

Show every connected user's live cursor and selection in a shared document, conflict-free, over WebSocket.

◆ Projects

Command palette

A ⌘K command palette with fuzzy ranking, async action sources, and complete keyboard control (arrows, Enter, Escape, scoping) — the interaction layer every power-user tool needs.

◆ Projects

Consistent hashing ring

Build a virtual-node hash ring that remaps only the minimum set of keys when a node joins or leaves — the foundational primitive behind Dynamo, Cassandra, and every sharded cache that must survive node churn without a full reshuffle.

◆ Projects

Feature-flag service

Build a small flag service with targeting rules, percentage rollouts, and a typed SDK that evaluates flags client-side from a cached ruleset.

◆ Projects

A concurrent Go ingest service

Build a concurrent ingest/fan-out worker in Go — then operate it: bound the work, apply backpressure, make downstream calls survive failure, ship it in a minimal container, and work a goroutine-leak incident before it eats your memory.

◆ Projects

Huffman coding

Build a lossless compressor from scratch: construct the optimal prefix-free code tree bottom-up, derive the bit strings, and prove the round-trip is exact and the output is shorter than fixed-width encoding.

◆ Projects

JSON parser from scratch

Write a spec-correct recursive-descent parser for JSON — tokenizer, value dispatcher, escape handler, number decoder — and watch every edge case in RFC 8259 become a concrete code path.

◆ Projects

LRU cache

Build a Least-Recently-Used cache that evicts in O(1) by combining a hashmap and a doubly-linked list — the canonical interview problem that teaches you exactly why cache eviction is harder than it looks.

◆ Projects

A Next.js app to production

Build a multi-tenant content app on the App Router — then run it: lock down auth and secrets, layer the caches, decide every edge-vs-node call, and work the incident when one tenant poisons a shared ISR page.

◆ Projects

Offline PWA sync

Offline-first notes PWA: a local write queue (IndexedDB) that syncs on reconnect with last-writer-wins conflict resolution, a service worker for asset caching, and background sync for missed flushes.

◆ Projects

Presigned upload flow

Direct-to-storage uploads via presigned URLs with size/content-type limits and a completion webhook that verifies the object actually arrived — so your API server never touches file bytes.

◆ Projects

Async Python service, built and operated

Build an async FastAPI ingestion service that validates, pipelines, and survives load — then run it: package it, containerize it with correct PID-1 behaviour, and work the incident when a swallowed CancelledError quietly leaks tasks until the event loop starves.

◆ Projects

Query plan visualizer

Paste an EXPLAIN (ANALYZE, FORMAT JSON) and render the plan tree with per-node timing and row-estimate error, so a bad join jumps out visually.

◆ Projects

Distributed rate limiter

Build a token-bucket limiter that holds across many app instances by keeping the counter in Redis, not in process memory.

◆ Projects

React feature at scale

Ship one real production React feature — a live collaborative activity dashboard — then operate it: optimistic edits, streaming updates, a frame budget, full a11y, and an incident drill when a render storm freezes the tab.

◆ Projects

Regex engine

Build a regular expression engine from scratch using Thompson NFA construction and subset simulation — the same technique that makes grep and re2 immune to catastrophic backtracking.

◆ Projects

Signals mini

Build a ~100-line reactive signals library (signal/computed/effect) with automatic dependency tracking and glitch-free batched updates — the same model that powers Solid, Preact Signals, and Vue 3.

◆ Projects

Skip list

Build a probabilistic ordered data structure that delivers O(log n) search, insert, and delete without the rotation bookkeeping of balanced trees — just layered express lanes through a sorted linked list.

◆ Projects

Text diff — Myers algorithm

Implement the Myers diff algorithm from scratch: compute the longest common subsequence, backtrack an edit script, prove minimality, and apply patches so any round-trip is byte-perfect.

◆ Projects

Topological build scheduler

Build a DAG-based task scheduler — like Make or a CI pipeline — that orders jobs by dependency, detects cycles before they deadlock, and identifies which tasks can run in parallel.

◆ Projects

Trie autocomplete engine

Build a prefix tree that powers ranked autocomplete — insert words with weights, walk every prefix in O(prefix length + results), and handle tie-breaking deterministically without a database.

◆ Projects

Union-Find (Disjoint Set Union)

Build a disjoint-set structure from a naive parent array up to near-constant amortized time — then use it to drive Kruskal's MST algorithm on a weighted graph.

◆ Projects

URL shortener at scale

Build a URL shortener that survives real traffic — then run it: deploy it, watch it, and work the incident when one hot link melts your cache.

◆ Projects

Virtual data grid

Render and smooth-scroll 100k rows at 60fps with windowing/virtualization, sticky headers, and full keyboard navigation — no library, just math.

◆ Projects

Crash-safe key-value store with a WAL

Build a tiny on-disk KV store that survives a kill -9 mid-write by appending to a write-ahead log before touching the main file.

Next track

Data Engineering

Working with data at scale — storing huge volumes cheaply and running analytics and search over it. Advanced; learn regular databases first.