-
-
Notifications
You must be signed in to change notification settings - Fork 800
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
Performance hit on websockets when upgrading to channels 2 #943
Comments
Is there a 200ms delay/sleep somewhere behind the scenes? I've just tested on a i7 PC and I'm getting pretty much the same timings :( I just wanted to add this because I don't think it's the rpi slowing things down. |
The only built-in sleep we have anywhere is a 10ms one in the channel layer receive method, and you're not using that here. To clarify, are you saying that just the channel layer send is slow? That would be a very different problem to |
I've done a few more tests on my home PC and it seems that when using groups things are much slower:
I got these timing results:
It looks like groups make things ~100 times slower. Here are the consumers:
|
I can believe that - could you open this as a |
Here is the link to the |
Hi,
I've been running channels v1.x on a Raspberry pi for a couple of months now and I'm quite satisfied with the performance. However I wanted to test the new channels v2 and I noticed a performance hit when sending a message through websockets. I'm measuring send times in the following way:
v2:
where MyConsumer is:
Here are the results with v2:
Server is started this way:
Here's how I measure time in v1.x:
Here are the results with v1.x (same data is being sent):
Servers are started this way in v1.x:
pip versions in v1.x:
pip versions in v2:
Could you give me a hint what to change in order to have a similar performance as in v1.x? Many thanks in advance!
The text was updated successfully, but these errors were encountered: