SDK: Migrate to lzma-rust2 instead of patina-lzma-rs#1611
Merged
Conversation
os-d
requested review from
Javagedes,
cfernald,
kouchekiniad,
makubacki and
vineelko
July 2, 2026 21:18
Contributor
✅ QEMU Validation PassedAll QEMU validation jobs completed successfully.
Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/28887676740 Boot Time to EFI Shell
Dependencies
This comment was automatically generated by the Patina QEMU PR Validation Post workflow. |
apop5
approved these changes
Jul 2, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
kouchekiniad
approved these changes
Jul 2, 2026
Collaborator
|
If this can wait until Monday, I'd be happy to look at it then. As mentioned offline, it's great to move off our custom fork of lzma-rs and pick up the perf improvement. |
makubacki
approved these changes
Jul 6, 2026
Javagedes
reviewed
Jul 6, 2026
Javagedes
approved these changes
Jul 6, 2026
makubacki
reviewed
Jul 7, 2026
patina-lzma-rs is a fork of the unmaintained lzma-rs crate that adds no_std support for it. lzma-rust2 is a maintained fork of lzma-rs that already contains no_std support and large performance improvements over lzma-rs. On an example AARCH64 platform, decompressing an LZMA compressed FV went from 2500 ms with patina-lzma-rs to 1314 ms with lzma-rust2. This commit moves patina over to the maintained crate with better performance that doesn't require a custom override. The optimization feature is not enabled because it is primarily for encoding (which patina does not do) and does not support the FORMAT_ONLY compression type that our FV use, so the performance is the same but it adds unsafe code. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
os-d
enabled auto-merge (rebase)
July 7, 2026 17:46
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
patina-lzma-rs is a fork of the unmaintained lzma-rs crate that adds no_std support for it.
lzma-rust2 is a maintained fork of lzma-rs that already contains no_std support and large performance improvements over lzma-rs.
On an example AARCH64 platform, decompressing an LZMA compressed FV went from 2500 ms with patina-lzma-rs to 1314 ms with lzma-rust2.
Host based benchmarking shows similar performance improvements.
This commit moves patina over to the maintained crate with better performance that doesn't require a custom override.
The optimization feature is not enabled because it is primarily for encoding (which patina does not do) and does not support the FORMAT_ONLY compression type that our FV use, so the performance is the same but it adds unsafe code.
How This Was Tested
Tested with local benchmarks and running on an AARCH64 platform.
Integration Instructions
N/A. The changed dependency will be picked up automatically. patina-lzma-rs will be deprecated.