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

Download vs Install Size #51

Open
kibotu opened this issue Apr 17, 2024 · 5 comments
Open

Download vs Install Size #51

kibotu opened this issue Apr 17, 2024 · 5 comments

Comments

@kibotu
Copy link

kibotu commented Apr 17, 2024

As far as I can tell, the output is always install size. For app install / update size optimisation we'd be interested in the compressed sizes as well. Any ideas?

@marinofelipe
Copy link
Owner

Hi @kibotu, good question

From what I recall the output is actually the download size, but the universal one.
It should be possible to use thinning export options in order to have size report for a single variant, for a more "precise" download size.

And the thinning report has both compressed/download and uncompressed/install, which could be interesting for a more complete report.

https://developer.apple.com/documentation/xcode/reducing-your-app-s-size#Create-the-app-size-report

@marinofelipe
Copy link
Owner

In general, I think it's something interesting to look into and extend the tool to support :)

It could be something as:

  • Allow the user to pass one ore many thinning_reference_device's
    • Default is universal, like currently is
    • Different business have different device models as their mostly used one(s), so it make sense to have them decide which, imo
  • Support both download and install size in the report

What do you think @kibotu? Curious to about your ideas

@kibotu
Copy link
Author

kibotu commented Apr 22, 2024

great ideas! not sure yet how to parameterize this project accordingly just yet though

@kibotu
Copy link
Author

kibotu commented Apr 23, 2024

I've removed vision and macos as build destination of the example app

Screenshot 2024-04-23 at 09 50 15

and added -sdk iphoneos \ to the archive command

the binary sizes became smaller (from 4.8mb to 2.2mb) however if i run this on a few dependencies it quickly shows that the sizes don't add up to the final IPA.

IPA 17.1 MB

package 1 - 2,2 MB
Screenshot 2024-04-23 at 09 56 07

package 2 - 8,4 MB
Screenshot 2024-04-23 at 09 56 13

package 3 - 16,4 MB
Screenshot 2024-04-23 at 09 57 43

package 4 - 10,9 MB
Screenshot 2024-04-23 at 09 57 50

package 5 - 10,9 MB
Screenshot 2024-04-23 at 09 57 54

package 6 - 12,7 MB
Screenshot 2024-04-23 at 09 57 58

package 7 - 13,4 MB
Screenshot 2024-04-23 at 09 58 03

there are 29 modules in total.

to me it looks like the size includes dependencies, which makes it difficult to measure a single package.

is there a way to exclude other dependencies when measuring by any chance?

@kibotu
Copy link
Author

kibotu commented Apr 23, 2024

Even if I subtract all the dependencies from each other, the app size still does not add up

Screenshot 2024-04-23 at 10 08 28

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

No branches or pull requests

2 participants