New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let NOTICES be double gzip wrapped to reduce on-disk installed space #71899
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
You can see the powershell fallbacks here: flutter/bin/internal/update_dart_sdk.ps1 Lines 73 to 89 in 23c7ee9
|
Thanks for the tip. I ended up just unpacking the APK in dart instead of shelling out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code LGTM. Can you give this a TestFlight run to confirm there's no unexpected consequences to publishing an app with that embedded file type?
g3 rollers: subclasses must implement https://github.com/flutter/flutter/pull/71899/files#diff-1339eded5eeb35ab9fbc61051c530c73e307d4640328760c1af0eee36c142be2R172. |
Hi, @xster , actually I didn't see this comment until now. Could you please communicate on the internal channels next time so we can track this sooner? Thanks! |
@renyou will do. Though this one in particular was reverted, so no action needed in this case. |
Fixes #71102. It doesn't quite deduplicate the contents of NOTICES while in transport, but just leaves it compressed on disk until it's actually read since it's an uncommonly used file. Reduces uncompressed (.ipa perspective, not this file's perspective) size from ~800kB before to ~60kB after.
It leaves web as is since the client doesn't have dart:io or any "native" abilities to unzip. It also has a .Z extension instead of a .gz extension because there are logic baked in in gradle that traverses all the files of an APK and unzips the .gz files. Checked with the gradle team. Our usage here isn't circumventing any meaningful optimizations. It was just originally meant to avoid people thinking this reduces network size (which this doesn't and doesn't intend to) and costing unzip CPU cost (which doesn't affect this since it's uncommonly used).
Added some new tests but https://github.com/flutter/flutter/pull/71899/files#diff-7e359e27713e3f080b4385c7e6b690e7aa3ab982c98855a088ed00e07bfaa6e5R16 actually ends up making this get tested everywhere.
For future rollers, this will break g3. Subclasses will need to implement the new signature to match.