-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drastically increase loading of trainer page #344
base: master
Are you sure you want to change the base?
Conversation
Make sure that you have index on the following fileds: trainer.name gympokemon.trainer_name gympokemon.pokemon_uid gymmember.pokemon_uid
The query originally resulted 0 in maxCP if the trainer did not have any pokemon in gyms (also only counted the cp of the pokémon in gyms). I left it this way - assuming this was intended - but it can be fixed easly |
First query Second query Third query In summary, the current code is always giving me faster responses of the XHR call of aru.php in my setup. Which is due to the first query taking way more time. ~500ms vs. >1s 1.200 gymmember |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs revision
Is the API live again? :-O |
No, but we now can MITM the app and extract proto infos from real devices |
Make sure that you have index on the following fileds:
trainer.name
gympokemon.trainer_name
gympokemon.pokemon_uid
gymmember.pokemon_uid
Optimized SQL query of loading trainer data
Description
Modifications in the query
Motivation and Context
On bigger databases, trainer page loaded very slowly
How Has This Been Tested?
Tested on my configuration with 32000 rows in trainer table, and 630000 rows in gympokemon table. Query ran about 4-6 times faster
Screenshots (if appropriate):
Types of changes