-
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
Slow bot startup after telegram is enabled #5527
Comments
This slowdown might be caused by slow internet connection. I take that the TelegramTask sends one message at a time, no? So for each log message, the bot sends an api request to telegram and if internet connection is sluggish, then the bot is also sluggish. Can someone confirm this? Maybe we can have an option to batch send logs to minimize bandwidth consumption. |
I think there are more events that can be removed from the list. I'll check it out today. |
This should fix it I think... I got rid of all login events in telegram so it should only start sending msgs after the bot starts. Avoiding any bog at startup. |
Sorry @Gobberwart wants to display events that dont fire in telegram instead of accepting this fix. |
Not quite. I said I don't think removing events will fix slow startup, but I agreed with removing imports. I never said to close the PR, just maybe put a bit more thought/testing into it. Also.. what do you mean "don't fire in telegram"? Why don't they fire? And how do they display if they don't fire? |
Also worth noting that the section where you're removing events doesn't even run until the bot goes to generate a list of available events (in response to /events), and takes microseconds to run. All you're doing is hiding events from the available list. Should have zero impact on performance. |
That just removes them from list. If you actually looked at the code you would see where i remove the actual subscription. |
Its fine...i am wrong. |
FYI I'm running Telegram with /sub all and this is what I get at start:
Since IncubateEggs is a task, that's complete startup in 9 seconds. With telegram running. I wouldn't call that slow. |
OK just finished doing a fair bit of work on telegram handler which should a) improve speed and b) fix some issues with master. Waiting on merge approval now. |
Fixed #5537 |
Expected Behavior
The bot used to start fast.
Actual Behavior
After I enabled telegram, the bot startup is super slow.
Your FULL config.json (remove your username, password, gmapkey and any other private info)
config
Output when issue occurred
Please note the time differences of each log line. Mostly ten seconds or more. Before enabling telegram, I had no problem with this. The bot just starts fine and fast.
logs
Steps to Reproduce
Just run the bot. I specifically run the bot with these features enabled:
Other Information
OS: Kali Linux (Debian Jessie)
Branch: dev
Git Commit: 1963971
Python Version: Python 2.7.9
Any other relevant files/configs (eg: path files)
Path Config
The text was updated successfully, but these errors were encountered: