-
Notifications
You must be signed in to change notification settings - Fork 168
Size Comparison
Mike Schreiber edited this page Mar 9, 2023
·
1 revision
These steps are for iOS pull requests. Feel free to skip if your PR exclusively targets macOS.
Please include the output of scripts/GenerateBinaryDiffTable.swift, using the following steps:
- Ensure that your working branch is up to date with the base branch.
- Build the base branch Demo.Release scheme for Any iOS Device (arm64)
- Navigate to left panel:
FluentUI -> Products -> libFluentUI.a
- Show libFluentUI.a in Finder, and copy libFluentUI.a to a safe location for use later.
- (Optional) Also grab FluentUI.Demo while you're there, and likewise move it somewhere safe.
- Switch to your working branch and repeat steps 2-4.
- Now that you have both your old and new builds, you can run the script. From the root of this repo, you can run
swift ./scripts/GenerateBinaryDiffTable.swift <path to old build> <path to new build>
. This will generate a table that compares any changes in .o files between the two builds. - Copy the output of the script to this PR.
- (Optional) The default output will only show the total changes outside of the summary, but you might want to include any especially relevant or noteworthy changes in the initial table.
- (Optional) Another delta worth showing in the initial table comes from the demo app.
- Navigate to FluentUI.Demo that you saved in before steps 4.a, right click, and select "Show package contents"
- Find the FluentUI.Demo inside FluentUI.Demo, right click, and select "Get Info"
- Create a new row in the initial table, titled "unstripped FluentUI.Demo/FluentUI.Demo", and paste this value into the "Before" column.
- Run
/usr/bin/strip -Sx <path to FluentUI.Demo/FluentUI.Demo>
- Create a new row in the initial table, titled "stripped FluentUI.Demo/FluentUI.Demo", and paste this value into the "Before" column.
- Repeat steps a-e for the after build.
- Calculate the difference between the before and after builds, and put them in the "Delta" column.