performance

  • CLS is caused by an image without dimensions

    Layout shift is nearly always an element that reserved no space and then took some, and images are the largest single cause. Browsers compute an aspect ratio from…

  • Sparse fieldsets make the query count depend on the caller

    Letting a client choose which fields it wants is a good feature and moves the eager-loading decision from the controller to the request. Without deriving the eager loads…

  • wp_options autoload, ranked by size

    The total autoloaded payload is a single number that predicts a large fraction of baseline request time, and almost nobody knows theirs. Tracking the figure over time is…

  • WeakMap, and the cache that does not leak

    A memoisation cache keyed on object identity keeps every object it has ever seen alive, which in a long-running process is a leak with no upper bound. The…

  • A rate limit zone in nginx costs one shared memory block

    Rate limiting at the web server is cheaper than in the application and protects the endpoints the application never gets to serve. burst without nodelay queues the excess…

  • The report that should have been a materialised view

    MySQL has no materialised views and the report needs one anyway. A summary table, a watermark, and the backdated edit that breaks both.

  • Cardinality is the thing that kills a metrics store

    Every distinct combination of label values is a separate time series stored for the whole retention period, and one bad label is millions of them. The code that…

  • The retry that made the outage longer

    A dependency recovered and went straight back down. Every client retrying at once, in lockstep, is a load test nobody scheduled.

  • SCAN is not KEYS, and the difference is an outage

    KEYS blocks the server for the duration of a full keyspace walk, and Redis is single-threaded, so it blocks everything. The at-least-once guarantee means any script acting on…

  • An autoloaded option that holds a cache

    Every autoloaded option is fetched on every request, and a plugin storing a cache in one turns a cache into a fixed cost. The total autoloaded size is…