-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Reducing API Requests = Improving xp/hr #3247
Comments
👍 |
@TheSavior What about the gym details we're requesting en though the bot doesn't interact with any of them ? |
Concerning the inventory management I think that every task should track what it consumes/loot. The same way he's already doing it for candies. |
IMHO, tasks should not "track what it consumes/loot". We need a wrapper to API responses. Tasks shouldn't be aloud to access the raw api object. Instead they should only be allowed to access high-level objects, like a Pokemon object, with proper methods for releasing, for example, that will automatically update the inventory cache when called. This way it's impossible to have an outdated inventory cache and we get simpler tasks as bonus. |
@douglascamata That sounds great to me. That would keep us from getting into a situation where a task doesn't update the inventory correctly and messes everything up. |
@douglascamata Like having a class PokemonAPI containing every (and only) api call related to pokemons ? Hiding the inventory update from tasks seems great. The additional abstraction should also protect our bot from changes of the api too, which is always good to take imo. |
@BriceSD yup, a bit like that. |
Reducing unnecessary api requests is going to have the largest impact on improving xp/hr. I added logs for what API requests we are making. Here is a large amount of output: http://pastebin.com/4dGVasXa
Does anyone see anything that looks like we should be able to remove and speed up?
@aeckert, it seems like inventory management is a big piece we can improve here.
@douglascamata, any additional thoughts?
The text was updated successfully, but these errors were encountered: