Skip to content

Experiments#819

Draft
garydgregory wants to merge 340 commits into
fix/read-onlyfrom
master
Draft

Experiments#819
garydgregory wants to merge 340 commits into
fix/read-onlyfrom
master

Conversation

@garydgregory
Copy link
Copy Markdown
Member

No description provided.

garydgregory and others added 12 commits December 5, 2025 17:02
…an IllegalArgumentException for a new positive position that's too large (#817)

* [IO-856] Try test on all OSs for GitHub CI

* ByteArraySeekableByteChannel.position|truncate(long) shouldn't throw an
IllegalArgumentException for a new positive position that's too large

* Throw IOException instead of OutOfMemoryError

* Refactor internals for safer and less type casting
…an IllegalArgumentException for a new positive position that's too large #817
* [IO-856] Try test on all OSs for GitHub CI

* Add and use IOUtils.closeQuietly(Closeable, Throwable)
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@garydgregory garydgregory marked this pull request as draft December 14, 2025 15:29
- ~2.6x speedup on StringReader input
- ~10% speed on file resource as InputStreamReader

Benchmark
Mode  Cnt          Score         Error  Units
IOUtilsContentEqualsReadersBenchmark_2_22_0.testFileCurrent
avgt    5     105274.452 ±    1466.048  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testFileRelease2_22_0
avgt    5     107500.847 ±    1752.422  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testFile_2_21_0
avgt    5     115720.416 ±    1209.652  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testStringCurrent
avgt    5  113330719.330 ± 1187191.151  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testStringRelease2_22_0
avgt    5  110389392.582 ±  785367.455  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testString_2_21_0
avgt    5  284939866.619 ± 9969793.485  ns/op

Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1)
Maven home: /opt/homebrew/Cellar/maven/3.9.12/libexec
Java version: 21.0.9, vendor: Homebrew, runtime:
/opt/homebrew/Cellar/openjdk@21/21.0.9/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "26.2", arch: "aarch64", family: "mac"
- Add missing comment.
- Close HTML tags.
- Typos
garydgregory and others added 30 commits April 23, 2026 11:13
Bumps org.apache.commons:commons-parent from 99 to 100.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-parent
  dependency-version: '100'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The buffer is now cleaned only on the first close() call.
* Add Buffers clear() methods

* BufferedFileChannelInputStream now clears its direct memory byte buffer
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.

FileChannels.contentEquals(ReadableByteChannel, ReadableByteChannel,
int) now clears its direct memory byte buffer on close.

BufferedFileChannelInputStream now clears its direct memory byte buffer
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.

FileChannels.contentEquals(ReadableByteChannel, ReadableByteChannel,
int) now clears its direct memory byte buffer on close.

BufferedFileChannelInputStream now clears its direct memory byte buffer
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.
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.

7 participants