Skip to content

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:

  1. Ensure that your working branch is up to date with the base branch.
  2. Build the base branch Demo.Release scheme for Any iOS Device (arm64)
  3. Navigate to left panel: FluentUI -> Products -> libFluentUI.a
  4. Show libFluentUI.a in Finder, and copy libFluentUI.a to a safe location for use later.
    1. (Optional) Also grab FluentUI.Demo while you're there, and likewise move it somewhere safe.
  5. Switch to your working branch and repeat steps 2-4.
  6. 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.
  7. Copy the output of the script to this PR.
  8. (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.
  9. (Optional) Another delta worth showing in the initial table comes from the demo app.
    1. Navigate to FluentUI.Demo that you saved in before steps 4.a, right click, and select "Show package contents"
    2. Find the FluentUI.Demo inside FluentUI.Demo, right click, and select "Get Info"
    3. Create a new row in the initial table, titled "unstripped FluentUI.Demo/FluentUI.Demo", and paste this value into the "Before" column.
    4. Run /usr/bin/strip -Sx <path to FluentUI.Demo/FluentUI.Demo>
    5. Create a new row in the initial table, titled "stripped FluentUI.Demo/FluentUI.Demo", and paste this value into the "Before" column.
    6. Repeat steps a-e for the after build.
    7. Calculate the difference between the before and after builds, and put them in the "Delta" column.
Clone this wiki locally