Skip to content
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

Use a buffered inputstream to read from the socket #795

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

laeubi
Copy link
Contributor

@laeubi laeubi commented Sep 5, 2023

Currently the read from the socket is not buffered what can slow down reading bytes by byte.

This wraps the input stream in the PacketReader in a BufferedInputStream to read larger chuncks of data to improve performance.

Currently the read from the socket is not buffered what can slow down
reading bytes by byte.

This wraps the input stream in the PacketReader in a BufferedInputStream
to read larger chuncks of data to improve performance.
@laeubi
Copy link
Contributor Author

laeubi commented Sep 5, 2023

@hierynomus I'm not sure if there are any performance tests but while profiling my application I noticed that most time is spend on reading from the socket so I would assume this can increase performance here.

Signed-off-by: Jeroen van Erp <jeroen@hierynomus.com>
@hierynomus hierynomus merged commit 5a7766a into hierynomus:master Sep 11, 2023
6 checks passed
@hierynomus
Copy link
Owner

Thanks, I've fixed the styling issue detected, and approved and merged the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants