Post by Zaiyan Umer

SWE Intern @KNYSYS | CS @FAST | Automating things and building backend systems

Migrated to TanStack Query for a Faster, Smoother Dashboard... In my Task Manager project, performance issues weren’t obvious locally, but after deploying to Vercel, the dashboard felt slow and sluggish. Users waited seconds for basic data. Before (API timings): • tasks: ~700 ms • workload: up to 5.8 s • admin-stats: up to 4 s • my-stats: up to 3 s Why TanStack Query? It handles smart data fetching with caching, request deduplication, parallel queries, and background refetching, all while reducing boilerplate.   After Migration (Real Results): • Requests: 26 → 15 • Data transferred: ~758 kB → ~7.9 kB • Total resources: ~5.4 MB → ~444 kB Backend response times stayed similar, but perceived performance improved massively due to caching and parallel fetching.   What Changed for Users: • Dashboard feels instant after first load • No repeated refetching on navigation • Cached data shows immediately, fresh data loads in background

Post content