You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it not be a performance boost to use directly mapped library (LibFuse) and FileSystem callbacks (Options: Native.CB_OPTION_DIRECT) to boost performance of the calls?
By using JNA's: Native.register instead of loadLibrary and using the Native.CB_OPTION_DIRECT
It would ofcause require some refactoring of the code.
/rasmus
The text was updated successfully, but these errors were encountered:
You mention that allocating direct byte buffers is a significant bottleneck, and those are known to be slow.
It's possible that can be mitigated by changing
final ByteBuffer buf = buffer.getByteBuffer(0, bufSize);
final FileInfoWrapper wrapper = new FileInfoWrapper(path, info);
final int result = read(path, buf, bufSize, readOffset, wrapper);
into something more like
final byte [] buf = buffer.getByteArray(0, bufSize);
final FileInfoWrapper wrapper = new FileInfoWrapper(path, info);
final int result = read(path, buf, bufSize, readOffset, wrapper);
buffer.write(0, buf, 0, bufSize);
The JVM is pretty efficient with transient byte arrays, so it might not make sense to pools those.
Thanks for the good work!
Would it not be a performance boost to use directly mapped library (LibFuse) and FileSystem callbacks (Options: Native.CB_OPTION_DIRECT) to boost performance of the calls?
By using JNA's: Native.register instead of loadLibrary and using the Native.CB_OPTION_DIRECT
It would ofcause require some refactoring of the code.
/rasmus
The text was updated successfully, but these errors were encountered: