Skip to content
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

Use xcodebuild app thinning report in perf tests to track size of iOS apps over time #40471

Open
jmagman opened this issue Sep 14, 2019 · 3 comments
Labels
a: size Reducing IPA/APK/JS sizes a: tests "flutter test", flutter_test, or one of our tests c: performance Relates to speed or footprint issues (see "perf:" labels) P3 Issues that are less important to the Flutter project perf: app size Performance issues related to app size (binary/code size) or disk space platform-ios iOS applications specifically team Infra upgrades, team productivity, code health, technical debt. See also team: labels. team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team

Comments

@jmagman
Copy link
Member

jmagman commented Sep 14, 2019

Description

The perf tests currently tars the iOS ipa as a proxy for final app size. Instead, an "app thinning report" could be generated from a xcarchive:

xcodebuild -exportArchive -archivePath  /path/to/xcarchive -exportPath /path/to/export/location -exportOptionsPlist ExportOptions.plist

See xcrun xcodebuild -h for the valid export options plist keys. This was the plist I used for veggieseasons:

$ plutil -p ExportOptions.plist 
{
  "method" => "ad-hoc"
  "thinning" => "<thin-for-all-variants>"
}

(The "thinning" value should probably be a specific hardware string like "iPhone10,1" to trade-off for test time).

This command generates the ipas, as well as a App Thinning Size Report.txt and app-thinning.plist.

Also see "Getting app size report" in this tutorial.

@jmagman jmagman added a: tests "flutter test", flutter_test, or one of our tests team Infra upgrades, team productivity, code health, technical debt. See also team: labels. platform-ios iOS applications specifically labels Sep 14, 2019
@jmagman
Copy link
Member Author

jmagman commented Sep 14, 2019

Also created is a ExportOptions.plist which contains the values from the passed in plist, merged with the default values. This is what was generated for me when I ran this on veggieseasons:

$ plutil -p /path/to/export/ExportOptions.plist 
{
  "compileBitcode" => 1
  "method" => "ad-hoc"
  "signingStyle" => "automatic"
  "stripSwiftSymbols" => 1
  "teamID" => "S8QB4VV633"
  "thinning" => "<thin-for-all-variants>"
}

\cc @dnfield

@dnfield
Copy link
Contributor

dnfield commented Oct 30, 2019

When we do this, we should further otool or something on the resulting library to make sure that the install name is still valid after building bitcode.

@VladyslavBondarenko VladyslavBondarenko added the team-infra Owned by Infrastructure team label Jan 16, 2020
@godofredoc godofredoc removed the team-infra Owned by Infrastructure team label Feb 13, 2020
@jmagman jmagman added this to Awaiting triage in Mobile - team support review Feb 25, 2020
@TahaTesser TahaTesser added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 5, 2020
@jmagman jmagman added this to Awaiting triage in Tools - Xcode review via automation Mar 5, 2020
@jmagman jmagman added this to Awaiting triage in Mobile - app publication/release review via automation Mar 5, 2020
@jmagman jmagman removed this from Awaiting triage in Mobile - team support review Mar 5, 2020
@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in Tools - Xcode review Mar 5, 2020
@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in Mobile - app publication/release review Mar 5, 2020
@jmagman
Copy link
Member Author

jmagman commented Mar 5, 2020

This would be nice to have as a tool feature so end users can see app release size, too.

@jmagman jmagman added the a: size Reducing IPA/APK/JS sizes label Mar 5, 2020
@liyuqian liyuqian added the perf: app size Performance issues related to app size (binary/code size) or disk space label Mar 8, 2020
@liyuqian liyuqian added the c: performance Relates to speed or footprint issues (see "perf:" labels) label Mar 30, 2020
@jmagman jmagman added the P3 Issues that are less important to the Flutter project label Aug 11, 2020
@jmagman jmagman added this to Awaiting triage in iOS Platform - team support review Jun 8, 2021
@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in iOS Platform - team support review Jun 23, 2021
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: size Reducing IPA/APK/JS sizes a: tests "flutter test", flutter_test, or one of our tests c: performance Relates to speed or footprint issues (see "perf:" labels) P3 Issues that are less important to the Flutter project perf: app size Performance issues related to app size (binary/code size) or disk space platform-ios iOS applications specifically team Infra upgrades, team productivity, code health, technical debt. See also team: labels. team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team
Projects
Tools - Xcode review
  
Engineer reviewed
Development

No branches or pull requests

7 participants