Conversation
| , "react/socket-client": "^0.5" | ||
| , "ratchet/rfc6455": "^0.2.1" | ||
| , "react/socket": "^1.0 || ^0.8 || ^0.7" | ||
| , "evenement/evenement": "^3.0 || ^2.0" |
There was a problem hiding this comment.
Is this new dependency on Evenement related? I don't see this mentioned in the changeset otherwise.
There was a problem hiding this comment.
This was an existing dependency, when I installed with lowest deps, I found that WebSocket was using EventEmitterTrait.
There was a problem hiding this comment.
Indeed! Thanks for spotting and pointing this out, no objections in this case
:-)
|
I ran the Autobahn tests. There were some major slow downs with the newer versions in place. 9.4.1 went from 5 seconds to 15 seconds on my machine. Any ideas @clue? Otherwise, functions well. |
|
@cboden I'm not aware of any noticeable performance regressions in react/socket, except maybe reactphp/socket#114 if you're using an older PHP version? You may be able to lock to older versions and narrow this down to a certain version? Make sure to let me know if you find anything and I'm happy to address this upstream 👍 That being said, maybe get this in now already and address any performance regressions later? |
|
I believe I was using 5.4 without TLS. Perhaps the default chunk size changed between versions? I've never been a fan of sacrificing performance for the sake of a release. 😛 |
|
Ouch 😛 Yes, the above issue affects all socket streams for older PHP versions, including plaintext TCP/IP. Can you try |
|
Ah, sorry, I only read the title of the issue. 🔔shame🔔 on me. I'll test 0.8.2 as well as Autobahn against PHP > 7.1.4 on all 3 iterations to get more information on the performance numbers when I get home from work. |
|
I did tests with various versions of PHP and React libs. The 3x slower only happened on a couple tests which I believe is the result of write size buffering. I'm going to conclude that if that much performance is required the developer should be using PHP 7. :) |
There was a problem hiding this comment.
Whoops...I was looking at the wrong tests with my last comment...
With PHP 7.0.22 test 9.4.1:
stream-0.4.6 + socket-client-0.5.3 = 5858ms
stream-0.7.3 + socket-0.8.4 = 26569ms
Case Description
Send fragmented binary message message with message payload of length 4 * 2**20 (4M). Sent out in fragments of 64.
|
http://socketo.me/reports/pawl/diff.html See the 9.x section (Limits/Performance). Thoughts? |
|
Benchmarks on my system for autobahn test 9.4.1 (MacOS 10.13, homebrew php): Pawl 0.2.3: php 7.1.8, react/stream v0.4.6, react/socket-client v0.5.3: 4560ms Pawl 0.2.3: php 7.0.23, react/stream v0.4.6, react/socket-client v0.5.3: 4316ms |
cboden
left a comment
There was a problem hiding this comment.
Ok. That's good enough for me then. I'm going to chalk this up to I did my tests on a VirtualBox.
This PR updates react/socket. There are no API changes.