-
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
step_walker execution slows bot #3056
Comments
This is separate issue; profile highlights that writing out resources as a blocking call halts the bot.
Above is a blocking call to file system on bot event path. Kills performance |
This is going away with the incoming web ui with websocket support. When it is finished and working I'll remove all json files being written by the bot. |
@hew-xavier : while using raspbian did u had any particular configuration/modification that is not the wiki? I reported 2 issues, could u see if had the same while installing on raspbian? |
I manually installed protobuf 'apt-get' (had it for other reasons) |
I understand the issue is going away; however considering the performance impact 14 seconds to 0.5 seconds I think putting in configuration option would be suitable in short term. Especially in the context of other PR for similar bot issues. |
I have a same issue |
fix for this issue is here |
Not sure 3100 is a fix for this issue. Response in that thread seems to indicate differently. |
#3100 doesn't fix it. Handling a Queue that is being spammed with Threads in Python is not cheap at all and introduces a lot of overhead. |
@hew-xavier is this still an issue |
Expected Behavior
Bot should walk at speed similar to value as defined within configuration.
Due to bot design (single event loop) it is accepted that actual speed maybe slow due to other blocking tasks.
Actual Behavior
Walker (step_walker.py) blocks for extended period of time (9 to 14 second) for each 'step()'.
Profiler highlights this issue
ncalls tottime percall cumtime percall filename:lineno(function)
3 0.001 0.000 43.265 14.422 step_walker.py:40(step)
Potential issue could be the heartbeat
3 0.000 0.000 40.163 13.388 init.py:938(heartbeat)
Steps to Reproduce
python -m cProfile pokecli.py -cf
Reproduced by three different installations (3 differnt people)
Other Information
OS: raspbian, osx
Git Commit: fc4e802
Python Version: (run 'python -V' and paste it here)
The text was updated successfully, but these errors were encountered: