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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary reduction: remove unneeded .modifyIf statements #1967

Closed
wants to merge 2 commits into from

Conversation

mischreiber
Copy link
Contributor

@mischreiber mischreiber commented Feb 10, 2024

Platforms Impacted

  • iOS
  • macOS

Description of changes

WIP: Cleaning up some unneeded stuff in our SwiftUI components to reduce binary size a bit.

  • We do a little more modifyIf calling than is strictly necessary. Removing one in Avatar.

Binary change

Total increase: 18,744 bytes
Total decrease: -71,176 bytes

File Before After Delta
Total 31,061,888 bytes 31,009,456 bytes 馃帀 -52,432 bytes
Full breakdown
File Before After Delta
Avatar.o 599,920 bytes 615,512 bytes 鈿狅笍 15,592 bytes
FluentNotification.o 698,656 bytes 700,312 bytes 鈿狅笍 1,656 bytes
IndeterminateProgressBar.o 233,584 bytes 235,080 bytes 鈿狅笍 1,496 bytes
AvatarModifiers.o 44,016 bytes 42,448 bytes 馃帀 -1,568 bytes
SwiftUI+ViewModifiers.o 123,512 bytes 119,472 bytes 馃帀 -4,040 bytes
ListItem.o 274,344 bytes 267,128 bytes 馃帀 -7,216 bytes
__.SYMDEF 4,823,240 bytes 4,811,336 bytes 馃帀 -11,904 bytes
UIKit+SwiftUI_interoperability.o 46,448 bytes 0 bytes 馃帀 -46,448 bytes

Verification

Ongoing! Will post videos once validation is complete, and once I'm sure I won't be adding any more.

Visual Verification
Before After
Screenshot or description before this change Screenshot or description with this change

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@mischreiber mischreiber deleted the binaryReduction branch May 20, 2024 17:47
@mischreiber mischreiber restored the binaryReduction branch May 20, 2024 17:48
@mischreiber mischreiber reopened this May 20, 2024
@mischreiber mischreiber changed the title Binary reduction: remove AttributedText and unneeded .modifyIf statements Binary reduction: remove unneeded .modifyIf statements May 20, 2024
@mischreiber mischreiber deleted the binaryReduction branch May 20, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant