Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Size of iden3mobile.framework for iOS is too big (134,2 MB) #125

Open
rauljareno opened this issue Jun 3, 2020 · 7 comments
Open

Size of iden3mobile.framework for iOS is too big (134,2 MB) #125

rauljareno opened this issue Jun 3, 2020 · 7 comments
Labels

Comments

@rauljareno
Copy link
Contributor

rauljareno commented Jun 3, 2020

As an integrator wanting to use our technology, having to include a go-mobile library of 134 MB to the app the integrator is developing is too much. The size of this library should be reduced as much as possible.

The average app file size is 38MB for iOS
https://sweetpricing.com/blog/2017/02/average-app-file-size/

https://www.gamasutra.com/blogs/TobiahZarlez/20131028/203397/File_Size_an_important_factor_often_overlooked.php

@rauljareno rauljareno changed the title Size of Iden3Mobile.framework for iOS is too big (134,2 MB) Size of iden3mobile.framework for iOS is too big (134,2 MB) Jun 3, 2020
@arnaubennassar
Copy link
Contributor

Totally agree on that size matters. But is the framework size mapped 1:1 to the compiled app? Could you check that?

I think it will be quite hard to reduce the size of this artifact, keep in mind that this doesn't any kind of image or other heavy sized element, and the code it self shouldn't weight that much. On the other hand 3rd party libraries may be heavy but it's hard to modify them...

A part from that, the iOS release it's about 3 times bigger than the Android one, but I guess that it's still a lot.

@ed255
Copy link
Contributor

ed255 commented Jun 3, 2020

134 MB indeed seems too big! I have checked the library binary and it targets 4 architectures: [armv7] [i386] [x86_64] [arm64]. Considering that we are targeting iPhones and iPads, and that for some time iOS devices have been using arm64 (plus performance in 32 bits arch will be very poor), the app should only take the arm64 part, so the final size should be divided by 4 (33.5 MB).

I've also seen this related thread golang/go#15223 It states that after doing static linking with the library, the final app size is much smaller than the framework size.

@rauljareno
Copy link
Contributor Author

rauljareno commented Jun 3, 2020

Cool, we will need then to create too a demo app for the iOS Mobile SDK (wrapper) which will only include the core library framework to see the final app size is also reduced, so we can check this properly. Thanks @ed255 and @arnaubennassar

@arnaubennassar
Copy link
Contributor

arnaubennassar commented Jun 4, 2020

just by using --symlinks when zipping the framework reduced it's size to 41.5MB: https://github.com/iden3/iden3-mobile/releases/tag/v0.0.2

Do you think that this is good enough to close this issue @rauljareno @ed255 ?

@rauljareno
Copy link
Contributor Author

@arnaubennassar after unzipping the 41 MB zip file, the framework size is 135 MB still, so is the same problem.

@arnaubennassar
Copy link
Contributor

true, in that case we'll have to wait until we see the real weight on a app

@rauljareno
Copy link
Contributor Author

@arnaubennassar I would create two tasks from this issue, one is to check how to include only the architecture arm64 of the framework to reduce its size as @ed255 was mentioning, and the other one to create a demo app for iOS to check if the size is also more reduced.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants