profiling

  • The N+1 that only appeared in the API serialiser

    A controller with eager loading and four hundred queries anyway, because the query count depends on which fields the client asked for.

  • Xdebug 3 renamed every setting you knew

    Xdebug 3 replaced half a dozen independent toggles with one mode setting, and most documentation still describes the 2.x names. The port change from 9000 to 9003 is…

  • The cleanup function runs before the next effect too

    Cleanup is not only an unmount hook — it runs before every re-run of the effect, which is what makes a subscription with changing dependencies correct. The ordering…

  • Allocation in a loop, and the profiler that shows it

    A CPU profile shows where time is spent and not why, and a loop constructing an object per iteration frequently spends its time in the allocator rather than…

  • Profiling before you optimise

    Two days spent optimising a function that was 3% of the request. The profiler said so in ninety seconds, and nobody had run it.

  • Observability is three things, and logs are one

    Forty gigabytes of logs a day and no answer to “is checkout slow”. Metrics, logs and traces answer different questions, and logs were doing all three badly.

  • A report that was a loop, and the window function it became

    380 MB of memory and a nightly job that could not be run on demand. Running totals and rankings needed a loop before window functions, and the loop…

  • pt-query-digest ranks by total time, not by slowest

    The slow log ranks by individual duration, so a query taking two seconds once appears above one taking forty milliseconds two hundred thousand times. Ranking by total time…

  • EXPLAIN ANALYZE reports what happened, not what might

    EXPLAIN shows the plan and the optimiser’s estimates, and the estimates are frequently wrong — a query planned for 40 rows that reads 400,000 looks entirely healthy. The…

  • Lazy loading arrived in the browser

    One attribute replaces an IntersectionObserver and a library — and applying it to everything makes the Largest Contentful Paint worse rather than better.