Skip to content

Optimize uncompressed blobs #124

@crepererum

Description

@crepererum

Is your feature request related to a problem? Please describe.
Currently setting "no compression" for the blobs still sets a custom compressor for value-log:

let vlog_cfg =
value_log::Config::<MyBlobCache, MyCompressor>::new(MyBlobCache(config.cache.clone()))
.segment_size_bytes(config.blob_file_target_size)
.compression(MyCompressor(config.blob_compression));

This then skips this optimization here:

https://github.com/fjall-rs/value-log/blob/6f84890727c6f5906619d32a0886fa0c85eeea61/src/segment/reader.rs#L94-L106

but instead needs to clone the data unnecessarily often (here and here). I think at least one of these memcpys is avoidable.

Describe the solution you'd like
I think the cleanest way would be to set the value-log compressor to None.

Describe alternatives you've considered
Pass the decompress value owned instead of sliced/borrowed.

Additional context
-

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions