Message response can be very sluggish
WeebNetsu opened this issue · comments
Hello :)
So I've started moving my bot from Python to Nim, and for the most part there are no problems with the move, although, the response time often takes half a second more (or more) to send a reply, compared to the Python version... The Python version uses pyTelegramBotAPI
Now this is of course nothing massive, but that speed difference can sometimes be quite noticeable... Is this a Nim thing? Or maybe I'm compiling it wrong? Or is there something in the module slowing it down?
It seems to be fast at times and other times slow, I can't seem to pinpoint what causes the change in reply speed
I will do a benchmark to check it out.
Can you use treeform's hottie to figure out which is the time consumer?
Thanks :)
Yeah, I'll give it a shot :)
So I'm a total noob with hottie, should I be sending you the dump.txt?
If you dont mind
Also, here is my code, in case you think I may have done something wrong https://github.com/WeebNetsu/steves-teacher-telegram-bot
I figured out that post
method of asynchttpclient
tooks about 1s to send a message. Maybe that's why response is slow.
I'm trying to resolve it.
Yesterday I ran my bot on a server.
Everything was super fast, from sending messages to processing them.
**It was even faster than my nodejs bot. **
I honestly didn't expect that.
Maybe the issue is no longer valid
Glad to hear that!
@WeebNetsu can you please check it again?
Yes, I'm a bit busy this weekend, but I should be doing a lot of testing next weekend again, and will be able to check again ;)
Please reopen if needed