iowow
iowow copied to clipboard
[Question] Reading values without incurring a copy?
Is it possible to access the value of a key without incurring a memory copy? A cursory look through the code suggests that _kvblk_value_get
is the main entry point for reading values where a malloc
and memcpy
are required to read the value.
Is there any way to just have a pointer to the value returned? This can be beneficial if the value is serialized data such as a FlatBuffer or Binn that supports zero-copy operations. RocksDB has something called PinnableSlices that allows this. I'm curious if there's anyway to achieve something similar in iowow.
Hi @kennycarruthers! Sure currently its not possibly to get record without copying, will try to add some handy api this week.