Our admin dashboard felt heavy, so I measured it: 92 backend calls became 9

Rodney Dela Cruz

Technical Co-founder, eSerbisyo IT Solutions

  • infrastructure
  • performance
Table of before and after measurements from the eSerbisyo dashboard performance audit, showing idle Document Requests falling from 92 backend calls to 9 and speculative requests from 59 to 2.

Sitting idle on the Document Requests page, the eSerbisyo admin dashboard was making 92 backend calls and 59 speculative requests. After an audited pass it makes 9 and 2. The single largest cause was prefetching — the app was asking the server questions nobody had posed yet, just in case — and the rest was a handful of places where one small fact was being learned by re-fetching an entire page.

Those are the numbers. The more useful finding is where they came from, because the first page load barely improved at all, and that is the part worth understanding.

What I was actually measuring

eSerbisyo is the document services platform I co-founded for Philippine barangay offices: document requests, resident records, ID issuance, and payments. It is an admin dashboard, and admin dashboards have one job beyond correctness. They have to be fast, because the person using one is usually serving a line of residents who do not care how the architecture is arranged.

Mine was not fast. Nothing was broken, in the sense that pages loaded and buttons worked. But switching between pages felt like walking through water, and updates took long enough that you could feel the app thinking.

That is a subjective complaint, and subjective complaints are where performance work usually goes wrong — you optimise the thing that annoyed you rather than the thing that is expensive. So I had the whole app audited with one rule attached: measure first, fix second, and prove every fix with before and after numbers. If a number did not move, it either did not matter or the fix was wrong.

Where the 92 backend calls came from

The page that cried wolf. Sitting idle, Document Requests was issuing 59 speculative requests. A speculative request is one the app sends in anticipation of a navigation the user may never make — the framework’s own prefetching, warming data for a link before anyone clicks it. On a page with many links, each with its own data requirements, this multiplies quietly.

Prefetching is a good servant and a terrible master. It is genuinely useful when someone is clearly heading somewhere, and pure waste when the idle page is simply sitting there being looked at. Moving it to trigger on hover and keyboard focus — the two moments where intent is actually expressed — took speculative requests from 59 to 2 and backend calls from 92 to 9.

Every click paid full price. Three separate problems, all of the same shape:

  • Tenant reads were repeated inside a single render, so one page view asked the same question more than once.
  • Approving or rejecting a request dragged the entire detail page back from the server, to change one status field.
  • Payment status polling refreshed the whole route every 36 seconds or so, to learn one small fact.

Each is now answered from the smallest thing that can answer it. Mutations update from a private client-side snapshot of roughly 2 KB. Polling reads a single small resource response of roughly 2.6 KB instead of re-rendering a route. Repeated reads within a render are deduplicated, and independent reads run in parallel rather than queuing behind each other.

The distance between two servers. My Vercel functions were not in the same region as my Appwrite backend, so every single request paid for the physical distance between them. Pinning the functions to Singapore, alongside Appwrite, removed that latency. No code changed. The map was the bug.

Heavy passengers. The ID design studio was being shipped inside bundles served to pages that never open it; it is now deferred and loaded only where it is used. The legislative overview was fetching far more than it displays, and now projects only the fields the screen actually shows — halving its JSON payload from about 43 KB to about 20 KB.

Here is the full set of measurements, before and after:

Measurement Before After
Idle Requests speculative RSC requests 59 2
Idle Requests backend calls 92 9
Requests full-load backend calls 10 8
Settings full-load backend calls 9 6
Legislative overview backend calls 32 27
Legislative overview backend JSON ~43 KiB ~20 KiB
Ordinary Builder encoded JS resources 297,047 bytes 267,782 bytes
Extra detail RSC GET after a rejection 1 0
New rejection snapshot — 2,037 bytes
Paid poll detail RSC refreshes in ~36 seconds Route refresh mechanism 0. One 2,646-byte resource response

Why the first page load barely improved

Full-load backend calls went from 10 to 8 on Requests, 9 to 6 on Settings, and 32 to 27 on the legislative overview. Those are real reductions and they are also unremarkable, and I would rather say so than present the 92-to-9 figure as if it described the whole experience.

The reason is that these were never the same problem. A first page load is a sequence of requests the user asked for, each one earning its place. Idle behaviour and update paths are where the waste was, and those are not what a first-load measurement observes.

This is the general shape of frontend performance work, and it is worth stating plainly: the load you measured is rarely the load the user is complaining about. Someone’s complaint about an app feeling slow is almost always about the hundredth interaction of the day, not the first one. A tool that reports only first-load numbers will report a healthy app while the app remains exhausting to use.

The measurement that actually moved felt latency: across nine instrumented clicks, feedback landed between 1.6 and 9.4 milliseconds. That is the number I would have felt, and it is not visible in a first-load figure at all.

What I refused to trade away

Speed is easy to buy if you are willing to sell the wrong things, and in a multi-tenant system the wrong things are always available.

The ground rules for the entire update were that tenant isolation, the MFA and licence checks, payment verification, and the audit trail would survive untouched. Tenant isolation is the one I would not have moved for any latency figure: it is what stops one barangay’s resident records appearing in another barangay’s dashboard.

A dashboard that renders instantly and leaks one tenant’s records into another is not fast. It is finished. Every one of these optimisations had to be provably neutral on the security properties, which is why so many of them were about how data is fetched rather than whether it is fetched — a snapshot of 2 KB is cheaper than a page, and no less authorised than the page was.

What made it safe to rewrite a live dashboard in an afternoon

The only reason I could let an AI assistant rearrange the engine room of a production product in a single sitting is that the safety net was built before I needed it.

The fixtures. The audit ran against realistic volume rather than whatever happened to be in the database: 1,000 residents, 500 requests, 300 households, and 332 legislative measures seeded as test data. Heaviness hides at small scale and ambushes you at real scale — an app with nine records fetches nine records happily.

The staging watch. An automated QA suite walks staging after every deployment. It checks payments first, then walks the walk-in ID flow end to end, then re-verifies every known bug. That last category matters more than it sounds: a regression check pinned to a specific bug only fails if you break that bug again.

After this update it caught something real — an in-place refresh left over from an older bug that updated the issuance panel but not the header badge. The optimised build kept its promises everywhere except one inherited path, and the suite now names the exact field that misbehaves.

What I would tell other builders shipping this way

I build with heavy AI assistance, and the demo is where that workflow usually ends. Production is where the boring virtues start: staging before production, measurements before opinions, tests before surgery, and audits before accusations.

The assistant typed a great deal of the code. It did not choose the multi-tenant model in the first version, decide that tenant isolation was non-negotiable, or build the fixture set that made the audit mean anything. Those were person-made decisions, made deliberately, beforehand.

The dashboard runs like a dashboard now. It only took measuring what I had been content to feel.