Right now, the get_all_pages endpoint function is very slow. It uses the get_page function, which defaults to retrieving only 20 entries at once. Thus, when trying to fetch all entries from a resource with many entries (such as rustemon::pokemon::pokemon_species, which contains over a thousand entries), many extraneous requests are sent, which greatly impacts performance. This can be fixed by lowering the number of requests and asking for the proper amount of entries within the requests.
I also updated one of the examples, which displays the increased performance.
Right now, the
get_all_pages
endpoint function is very slow. It uses theget_page
function, which defaults to retrieving only 20 entries at once. Thus, when trying to fetch all entries from a resource with many entries (such asrustemon::pokemon::pokemon_species
, which contains over a thousand entries), many extraneous requests are sent, which greatly impacts performance. This can be fixed by lowering the number of requests and asking for the proper amount of entries within the requests.I also updated one of the examples, which displays the increased performance.