2026-10-14
We deleted the chart library for a 130 pixel donut
A dependency was most of the dashboard bundle and bought us two shapes.
On a throttled phone the dashboard took 4.1 seconds to draw its charts. The waterfall was not subtle: 388 kB of JavaScript, and roughly 130 kB of it was a charting library used for one donut and one bar chart. Recharts also fought us on touch targets — fourteen columns inside a 300 pixel card is about 21 pixels per tap, which is not a thumb-sized control.
Both charts are hand-drawn SVG now. Because the library was ours to replace, we could change the interaction too: dragging across the chart scrubs the selection instead of requiring a precise tap, and the axis scales to the data instead of always topping out at ten. The largest chunk on /dashboard went from 314 kB to 170 kB. The lesson we keep: measure the bundle before you defend it.