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

[Question] Usage of heap byte buffers in disk cache #3226

Open
sgup432 opened this issue May 14, 2024 · 0 comments
Open

[Question] Usage of heap byte buffers in disk cache #3226

sgup432 opened this issue May 14, 2024 · 0 comments

Comments

@sgup432
Copy link

sgup432 commented May 14, 2024

Hi,
I am using ehcache as a pure disk cache. I see that you folks are using heap byte buffers to read from file channels by doing below

ByteBuffer buffer) = ByteBuffer.allocate(length);
channel.read(buffer);

I wanted to why MappedByteBuffer was not the obvious choice while reading from the file which has its benefits by mapping section of file onto memory?
Considering heap byte buffers requires extra copy from direct buffer to heap buffer and may have performance impact?

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

No branches or pull requests

1 participant