#Time spent on reloading

2 messages · Page 1 of 1 (latest)

brisk tundra
#

Hello, i'm currently discovering tanstack, and i was wondering about something.
First of all, here is the git repo : https://github.com/HussonAxel/pokemon-living-dex
and the link https://pokemon-living-dex.netlify.app/
and the most significant thing is where i'm trying to reload the following :
https://pokemon-living-dex.netlify.app/abilities

I know that i should add a pagination to the table so it takes less time, but anyway i did some tests with a limit of 20 elements and it stills take quite a time.
So i was wondering, what could i do to improve the speed page reload, besides adding a pagination ?

Thanks to everyone 🙂

GitHub

Contribute to HussonAxel/pokemon-living-dex development by creating an account on GitHub.

golden belfry
#

from my short look, i'd say a tiny improvement will be to fetch fetchAllBerries before opening the /abilities page

then check the queeyCache if available before making an extra query, might change how you use queryOptions a bit.

aside that you can limit the initial query to 3 or 4 abilities, await in server side.
but also keep your fetch for all abilities, but don't awit that and stream it to the client.

might take a bit of logic to get it to work but outside outright pagination that could help a bit