brilam/QuickPokedex-Old

Timing of Populating Pokemon Table

Closed this issue · 1 comments

Currently, it takes roughly 12 to 15 minutes to populate the database (parsing and insertion of 12 Pokemon types, and parsing and insertion of 811 Pokemon) on a decent computer. This seems to be a bit unreasonable and it would be even worse on a mobile device running on Android. It takes roughly 24s to insert 10 pokemon (this includes parsing time and insertion time) and inserting the 12 Pokemon types.

Looked into the issue. While closing the PreparedStatement did help with getting successful responses, the timing couldn't be improved and doesn't appear to be an issue with the code that I've written. I've done a pingdom test to test how long it would take to make requests to the page and the results are below:

https://tools.pingdom.com/#!/Y38IN/http://pokeapi.co/api/v2/pokemon/1

Taking 17.29s for two requests with one request being unsuccessful.