This sounds like there are lots of optimization opportunities in that API. Although part of the problem might be that any data has to be copied to the heap to be accessible for Java code. ByteBuffers can provide limited access to off-heap memory, but retrieving data through these is equivalent to copying data around.
View all comments
Show parent comment
2
u/koflerdavid Jun 11 '24
Did you use Java NIO's API for memory mapping files or an FFI?