Message-ID: From: "jgardn3r (@jgardn3r)" To: "pgjdbc/pgjdbc" Date: Tue, 05 Aug 2025 03:24:58 +0000 Subject: [pgjdbc/pgjdbc] PR #3750: Use `BufferedInputStream` with `FileInputStream` List-Id: X-GitHub-Author-Id: 13903183 X-GitHub-Author-Login: jgardn3r X-GitHub-Issue: 3750 X-GitHub-Labels: performance X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3750 Content-Type: text/plain; charset=utf-8 Some places where `FileInputStream` was being used didn't have `BufferedInputStream`. In many of the use cases, these files were being read 1 byte at a time. This causes excessive IO calls to read the file. By ensuring the `InputStream` is buffered, the IO calls are minimised, improving the performance of the driver. This performance issue was noticed when a certificate file was on a network drive. It resulted in considerable network traffic. ### All Submissions: * [x] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document? * [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?