hierynomus / smbj

Server Message Block (SMB2, SMB3) implementation in Java
Other
705 stars 179 forks source link

Use a buffered inputstream to read from the socket #795

Closed laeubi closed 11 months ago

laeubi commented 11 months ago

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 commented 11 months ago

@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.

hierynomus commented 11 months ago

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