forked from image-rs/image-png
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance: Avoid spending time decompressing skipped frames.
This commit adds an internal `DecodeOptions::skip_frame_decoding` flag and sets it to true from `ReadDecoder::finish_decoding_image_data`. This results in the following performance gains when using the `next_frame_info` public API to skip frames: `change: [-94.186% -94.170% -94.157%] (p = 0.00 < 0.05)` This commit is mainly motivated by https://crbug.com/371060427 and image-rs#510. Hat tip to @kornelski for suggesting this approach in image-rs#510 (comment)
- Loading branch information
1 parent
2a619fe
commit 4c2e2d1
Showing
2 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters