Uh oh!
There was an error while loading. Please reload this page.
Tiff: Performance improvements for Fax4 decompression - #2134
Conversation
TonyValenti
commented
May 29, 2022
@brianpopow - I noticed that there seem to be a number of "constant" dictionaries that are used. I've seen many situations where dictionaries like that are refactored into a static switch method. This provides better performance because the C# compiler will optimize each switch statement instead of relying on the General purpose Dictionary Class. Wanted to mention that because it may further reduce memory as well. |
TonyValenti
commented
May 29, 2022
Err, further reduce execution time. |
…from the stream to avoid allocation
So far we are down from 117,745.8 us to 15,028.70 us. edit: with 10ff24f we are down to 12,071.3 us |
- Deflate and packbits are not supported by System.Drawing - When 1d Compression is chosen, TiffPhotometricInterpretation should be WhiteIsZero
TonyValenti
commented
Jun 9, 2022
@brianpopow Thank you so much for your work on this. Do you have the ability to publish an updated nuget package? If so, can you make that happen? |
brianpopow
commented
Jun 10, 2022
@TonyValenti only new stable release versions and hotfix versions will be published via Nuget, but you can use our MyGet feed for alpha releases: https://www.myget.org/feed/sixlabors/package/nuget/SixLabors.ImageSharp Just add this as an additional package source and you are good to go. |
Prerequisites
Description
This PR brings performance improvements for Tiff Fax4 decompression.
Related to #2132
Benchmarks:
main
PR
note:
Tiff/CCITTGroup4.tiffis the image from #2132