mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
Poor PpmdStream performance #557
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @klasyc on GitHub (Jan 31, 2023).
Hello guys,
I am trying to extract PPMd files created by Dmitrij Sharkin's PPMd compressor variant I using SharpCompress library. These files are basically the
PpmdStreamdata equipped by a simple header, for which I created a simple parser. I am using the code below for data extraction:The code above works, but it is very inefficient: My test file is approximately 9 MB long and extracts to roughly 168 MB. When I unpack it by 7-zip, it takes 1 - 2 seconds on my Core i7 laptop with SSD drive. Extracting the same file using the code above takes 11 seconds. Here are screenshots of my profiler:
It seems my program spends the majority of time inside the SharpCompress library, but unfortunately I don't understand how the
PpmdStreamis implemented and for me, it would be very hard to optimize it.Anyway, thank you for any suggestions.
@adamhathcock commented on GitHub (Mar 1, 2023):
PRs are welcome to improve this. Been out of it for personal reasons.