A slow API almost never needs a rewrite. It needs you to find the handful of places where the time actually goes. Here is the order I work in, and how it added up to a 3x speedup across more than a hundred endpoints.
Almost never. Most slow apps are slow in a small number of specific places, not everywhere at once. When you measure instead of guess, you usually find a handful of bad queries and missing indexes carrying most of the pain, and fixing those gets you most of the speedup for a fraction of a rewrite's cost.
It is when loading a list of items quietly fires one extra query per item, so a page showing fifty rows hits the database fifty one times instead of once or twice. It is the single most common cause of slow endpoints I see, and it usually hides behind clean looking code.
You measure the same workload before and after. If the number does not move, the change does not ship. A performance fix that is not backed by a before and after measurement is just a guess wearing a confident face.
Yes, this is one of my services. The API and Database Performance service page explains how an engagement works, and you can book a call from there.
Read next
The real story of moving a production app from Docker Compose to K3s Kubernetes without a single minute of downtime, and why running both environments in parallel is the only sane way to do it.
Tool Index is a working directory product with instant search, payments, and an admin queue, built by one person in under a month. Here is what made that pace possible, and what I would tell a founder who wants the same.
Generic AI does not know your product, your founder, or your mascot, so it guesses differently every time. A trained LoRA fixes that. Here is what actually decides whether the output looks right, and it is mostly the part people skip.