-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove the superflous SocketBuffer from asyncio PythonParser #2418
Remove the superflous SocketBuffer from asyncio PythonParser #2418
Conversation
083cb57
to
e0829f9
Compare
In addition, the |
326086a
to
4937db7
Compare
Codecov ReportBase: 92.03% // Head: 92.03% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2418 +/- ##
==========================================
- Coverage 92.03% 92.03% -0.01%
==========================================
Files 110 110
Lines 28737 28677 -60
==========================================
- Hits 26448 26392 -56
+ Misses 2289 2285 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
4937db7
to
9e225a5
Compare
@dvora-h , is this something you'd consided including in the next release? It sort of forms the conclusion to a lot of my asyncio related simplifications in the library. |
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.
@kristjanvalur Thanks for this!
Can you please remove the timeseries tests changes from this PR?
Because: 1. It is not related here, we prefer to do such things in separate PR's
2. Following changes in the module, this is happening there now and there is no need for it... (we have already changed the test accordingly)
Sure, I can remove that. Please understand, I find myself often adding unrelated fixes to unittests when doing these pull requests, because the unittests are sometimes very flaky. Of course they're not part of the PR as such, but I do like my PRs to pass the CI pipeline regardless. |
9e225a5
to
f4aee4c
Compare
Regarding the socket_read_size, I'll make a separate PR for that once this one is merged, so that you can evaluate that change separately. |
Thanks @kristjanvalur for all your hard work! |
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
asyncio
PyhonParser
was using aSocketBuffer
class to store incoming data. This is probably a carry-over from thenon-async version, but in asyncio, it is not needed. We can read directly from the
_stream
which is aStreamReader
withan internal buffer of 64KB.
This change removes redundant code and speeds up python parsing by relying on already-provided buffering and
readline()
functionality.