Role
Full-stack implementation
Case Study
Separating recent-block summary data from full block responses to improve list-view performance while preserving complete block data for detail pages and richer consumers.
Summary
Role
Full-stack implementation
Scope
Recent blocks list, block detail API, backend endpoint design, database query path, frontend list rendering
Focus
Payload size, API/UI contract alignment, list/detail data boundaries
Outcome
Reduced list responses from roughly 3–5 MB to 5–10 KB
Overview
The blockchain explorer needed to support a fast, scannable recent blocks list while block detail pages and richer consumers still required complete block data.
The key product requirement was to keep the recent blocks page useful for scanning, rather than reducing the number of blocks per request.
Each recent-block row only needed summary data such as block height, timestamp, and transaction count. The full block endpoint remained necessary for complete block information, including richer block data and transaction details, but that payload should not have been fetched for every row in the list view.
The issue was not only page rendering. The API contract did not match the UI consumption pattern for the high-frequency recent-block list.
The optimization came from matching the response shape to the UI consumption pattern: compact summaries for scanning, complete block data for detail views.
This was a full-stack project. I implemented the frontend changes, backend API changes, and related database work myself.
I identified the mismatch between the recent-block list UI and the full block response shape, split the list and detail consumption paths, and aligned the frontend around a lightweight summary response backed by a more appropriate database query path.
About a week after launching the blockchain explorer, the recent blocks page became noticeably slow. I inspected the network responses and found that the list page was fetching full block objects, including transaction details, even though the UI only needed compact row data.
I implemented a lightweight summary endpoint for recent-block list views and kept the full block endpoint for detail pages and consumers that needed complete block data.
Because I owned the frontend, backend, and database implementation, I could optimize the entire path: database query shape, API response shape, and frontend rendering model.
I considered returning fewer blocks per request, but that would make the page less useful. The better fix was to preserve the list experience while reducing the payload for each row.
The main lesson was that frontend performance is often a contract problem, not just a rendering problem — and when you own the full stack, you can fix the contract at the right layer.