-
Notifications
You must be signed in to change notification settings - Fork 60
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
Improve unmarshall performance #126
Conversation
03a6507
to
554c3ae
Compare
I've been running this in production for a while. I get more broken pipe errors with this change. Either there is a bug or its too fast that the data hasn't come over the wire yet, and since the unmarshall code never waits for data to arrive over the wire if its split between multiple reads it increases the chance it will process it too fast and it won't be there yet. |
I think broke resume with the change |
Added a test for resume |
Spent another couple hours testing this and its all working great with bleak |
Above comments are for the future. I'm speculating on ways to speed it up a bit more, but anything else is going to be a much smaller improvement and can come in a future PR |
You have failing tests. Please rebase against master and run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test failures
This change reduces the overhead of unmarshalling with the goal of having bleak scanners not overwhelming the system. See related issue: hbldh/bleak#236 (comment) ``` (speed_up_unmarsh) % python3 bench/unmarshall.py Unmarshalling 1000000 bluetooth rssi messages took 14.397348250000505 seconds (master) % python3 bench/unmarshall.py Unmarshalling 1000000 bluetooth rssi messages took 47.7756206660124 seconds ```
9591d88
to
276259f
Compare
Still looks good
|
👍 |
Thanks. I have a few more I can pull out as well that I'll cleanup and send as soon. I'm traveling this week so its going to depend on how |
This change reduces the overhead of unmarshalling with the
goal of having bleak scanners not overwhelming the system.
See related issue:
hbldh/bleak#236 (comment)