Skip to content

Reduce App Size – Assets (2)#23396

Merged
kean merged 2 commits intotrunkfrom
task/cleanup-project
Jul 6, 2024
Merged

Reduce App Size – Assets (2)#23396
kean merged 2 commits intotrunkfrom
task/cleanup-project

Conversation

@kean
Copy link
Contributor

@kean kean commented Jun 28, 2024

I made a mistake in the previous PR where I added compressed JPBackground pngs but completely forgot about Xcode compression – it was inflating them back to around 1.9 MBs. I don't think there is any good way of disabling it, so I re-implemented Jeremy's solution from #23261 since it's an even better option, reducing the size down to 35 KB as .svg files gets included in the .car bundle as is.

The new size of the compressed universal .ipa is 116.2 MB down from 122.3 MB (-6.1 MB).

Compressing other assets manually is pointless because Xcode will re-compress them again at build time, leading to a loss in quality unless we disable compression globally and manage it fully ourselves.

Screenshot 2024-06-28 at 3 43 22 PM Screenshot 2024-06-28 at 3 43 27 PM

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@kean kean force-pushed the task/cleanup-project branch 2 times, most recently from 7e9a7fd to a560a86 Compare June 28, 2024 18:58
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jun 28, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23396-22c4c39
Version25.1
Bundle IDorg.wordpress.alpha
Commit22c4c39
App Center BuildWPiOS - One-Offs #10263
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean force-pushed the task/cleanup-project branch from a560a86 to 3ca8096 Compare June 28, 2024 19:09
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jun 28, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23396-22c4c39
Version25.1
Bundle IDcom.jetpack.alpha
Commit22c4c39
App Center Buildjetpack-installable-builds #9310
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean force-pushed the task/cleanup-project branch from 3ca8096 to f0b2ab3 Compare June 28, 2024 19:42
@kean kean requested a review from jkmassel June 28, 2024 19:58
@kean kean added this to the Pending milestone Jun 28, 2024
@jkmassel jkmassel enabled auto-merge July 5, 2024 22:17
@jkmassel jkmassel added this pull request to the merge queue Jul 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 5, 2024
@kean kean added this pull request to the merge queue Jul 5, 2024
Merged via the queue into trunk with commit 2a20648 Jul 6, 2024
@kean kean deleted the task/cleanup-project branch July 6, 2024 00:20
@hoangatuan
Copy link

hoangatuan commented Jul 6, 2024

Hi @kean,
I'm curios and I want to understand more about your PR.

For example, I have a Figma design, and I download some icons in 3 different formats: PNG, SVG, and PDF.
The icon sizes in 3 formats are:

  • PNG: 356 bytes 1x, 614 bytes 2x, 872 bytes 3x
  • SVG: 663 bytes
  • PDF: 2KB.

After some measures, using 3 PNGs has a smaller Assets.car file size compared to using SVG and PDF.
With that conclusion, in your case, using 3 PNGs for JPBackground should be better than using 1 SVG.

My question is: How did you generate the SVG that is so small (only 2KB) compared to 3 PNGs and 1 PDF format?

Screenshot 2024-07-06 at 18 30 49

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.

4 participants