You’ll measure where JavaScript spends its time, see what its engine learns, trace what keeps objects alive, and read the specification. Your project: find out why a game server’s match-log processor, which keeps a match history and the standings, slows down.
Here’s a first taste. Tonight’s log has three matches. The processor records each one in its history and adds up each team’s points:
const history = [];
const totals = new Map();
function recordMatch(match) {
history.push(match);
const current = totals.get(match.team) ?? 0;
totals.set(match.team, current + match.points);
}
recordMatch({ id: "M1", team: "Falcons", points: 3 });
recordMatch({ id: "M2", team: "Owls", points: 2 });
recordMatch({ id: "M3", team: "Falcons", points: 4 });
console.log(totals);
console.log(history.length);
The totals print, Falcons 7 and Owls 2, and the history holds all three matches:
Map(2) { 'Falcons' => 7, 'Owls' => 2 }
3
The scores are right, but nothing takes a match out of the history. On the server, the history keeps every match all day. And the standings, the totals above, refresh more slowly. Where does the time go, and what keeps the matches alive?
By the end of this course, you’ll be able to:
- Profile before changing code, and time it fairly
- Explain what the engine learns, and keep records consistent
- Trace what keeps a match alive, attach notes without owning players, and keep cleanup explicit
- Settle a question with the specification
You need to know CPython’s bytecode, reference counting, garbage collection and profiling. In JavaScript, you need Maps, arrays, objects, functions and modules.
You need a current version of Node, and no packages. The examples use Node 26 and Python 3.15. Timings, profiles and memory readings vary by machine and Node version, so each one in the course is labeled as an observation, not a promise.
The course mixes short videos with text lessons and exercises. Every video has a summary below it. A quiz and a summary close the course.
Next up: Finding the Expensive Work, where you profile 50,000 match rows before changing anything.