Skip to content

Use a buffered inputstream to read from the socket#795

Merged
hierynomus merged 2 commits intohierynomus:masterfrom
laeubi:use_buffered
Sep 11, 2023
Merged

Use a buffered inputstream to read from the socket#795
hierynomus merged 2 commits intohierynomus:masterfrom
laeubi:use_buffered

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 laeubi requested a review from hierynomus as a code owner September 5, 2023 13:33
@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 <[email protected]>
@hierynomus hierynomus merged commit 5a7766a into hierynomus:master Sep 11, 2023
@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