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

12.1.0 - Allow configuring minimum size before File Mapped Buffers are used. #12701

Open
joakime opened this issue Jan 10, 2025 · 0 comments
Open

Comments

@joakime
Copy link
Contributor

joakime commented Jan 10, 2025

Jetty version(s)
12.1.0

Enhancement Description

There are several places we use the FileChannel.map() feature to load File as a memory mapped ByteBuffer.

The javadoc for this method indicates the following memory concern ...

"For most operating systems, mapping a file into memory is more expensive than reading or writing a few tens of kilobytes of data via the usual read and write methods. From the standpoint of performance it is generally only worth mapping relatively large files into memory."

The enhancement is that there should be a configurable minimum size before a memory mapped ByteBuffer is used, vs a normal ByteBuffer from typical file I/O operations.

Discovered as part of issue #12695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant