Skip to content
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 answer #83

Open
LifeBasher opened this issue Mar 4, 2019 · 4 comments
Open

Slow answer #83

LifeBasher opened this issue Mar 4, 2019 · 4 comments

Comments

@LifeBasher
Copy link

Hi,
is there anyone who know how to reduce the answer time to respond?
i read on some place that someone figured how to use the protocol S3( like the official bot is using) instead of S4 (like we are using in line-py) and it reduce from 6 second to 0.4 sec (way faster like the official bot).
Any idea?
This is the other place im talking about but its using the same base as line-py
(yes i read that we had to modify thrift and config)
ruyaoyao/LINE-instant-messenger-protocol#5

Thanks

@ii64
Copy link

ii64 commented Mar 6, 2019

Checkout your Internet uplink, remove unused code that may increase your task working time.

@LifeBasher
Copy link
Author

LifeBasher commented Mar 9, 2019

easier said than done :) unused code shouldnt increase the task working time no? but basically you are telling me that i need to remove some validation code the process dont really need to work? Sorry im more a database programmer than a web programmer and i never did the part where i got to connect so i'm mostly trying to figure it out.
Most of my chatbot is database related so it work nice and easily keep info but i just have that slow answer problem :P
This week ill look how i can remove the handshake process like you talk about in some other thread and will continue to look for what can be removed :)

@ii64
Copy link

ii64 commented Mar 10, 2019

It probably your long polling, sometimes LINE kinda buggy (like there's already new Op, but long polling not emitted new one, or it just like... died socket). Oh ya one thing, LINE didn't actually handshake https like you'll understand this uri scheme [:proto]://[:host][:ssl_proto_default_port]/[:uri] (gist code)

@LifeBasher
Copy link
Author

@anysz i thought that the long polling was the action(events) received?..... because that part is really quick.
I wanted to add stuff to my bot before looking more about that. im gonna time every part and look for what slow it down lol.
i read what you were talking about going into http or the point that the https wasn't always connected so it was slowing thing down so ill look into it.

if i can ask you something else.... do you have any idea how the bot could download an image sent by an other user?
i managed kick/protection/ban/tagall/sending image (really really slow cause of the same issue here) lots of other stuff linking the bot with my db but cant manage to download an image sent by a user lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants