why the emit method is so slowly #1294
Unanswered
ZhuqiushiCasual
asked this question in
Q&A
Replies: 1 comment
-
I don't see anything that can cause a delay in the code that you shared. My guess is that your FastAPI application blocks, preventing the background work that python-socketio does to send a message from happening in a timely manner. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I interact with the frontend or test my API using Postman, there's an approximate 5-second difference between the time the client receives the 'emit' event and the time I log as the sending time on the server side.
This is my server python code
this is server emit time


this is client receive emit time
my pip repository version
If you could take some time to look into this, I would greatly appreciate it.
just now, I found that when adding an emit behind the emit in the above code, the first emit will be sent to the client immediately.
Is there a queue here? How to turn off the queue? Or increase the speed of the queue sending?
Beta Was this translation helpful? Give feedback.
All reactions