rnote icon indicating copy to clipboard operation
rnote copied to clipboard

zstd with parallelism instead of gzip

Open anesthetice opened this issue 1 year ago • 4 comments
trafficstars

https://github.com/anesthetice/rnote-compression-benchmarking/

From the compression methods tested, zstd seems to be a better choice for the rnote file format:

  • Better compression ratio
  • Faster reads + writes
  • Simple multi-threading
median out of 16 samples

anesthetice avatar Aug 07 '24 21:08 anesthetice

Implementation went smoother than what I expected, rnote can still decompress gzip files and will compress them using zstd the next time the file is saved. One thing left to discuss I think is, should we expose the compression level to users?

anesthetice avatar Aug 08 '24 16:08 anesthetice

Here's a rough before and after comparison of a couple files (different to the ones used for rnote-comp-benchmarking)

Before: 2024-08-08-190025_hyprshot

After: 2024-08-08-190046_hyprshot

anesthetice avatar Aug 08 '24 17:08 anesthetice

Amazing work, that is exactly what I was talking about. Thanks, for looking into this! Looks like it's definitely worth considering. :)

RayJW avatar Aug 08 '24 20:08 RayJW

converted this to a draft, to focus on an updated file format

anesthetice avatar Aug 14 '24 15:08 anesthetice

closing this to de-clutter, see https://github.com/flxzt/rnote/pull/1177

anesthetice avatar Aug 25 '24 17:08 anesthetice