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

Exceeding the 64k method limit #3924

Closed
hypest opened this issue Apr 5, 2016 · 6 comments
Closed

Exceeding the 64k method limit #3924

hypest opened this issue Apr 5, 2016 · 6 comments
Assignees

Comments

@hypest
Copy link
Contributor

hypest commented Apr 5, 2016

The feature/gravatar-upload-okhttp branch (at 30fa971) manages to exceed the 64k method limit.

We need to decrease the app's current method count.

@maxme
Copy link
Contributor

maxme commented Apr 6, 2016

In current develop ede6a91, overall method count: 63910 (debug) / 63889 (release)- so that's definitely a problem we have to solve asap.

@maxme
Copy link
Contributor

maxme commented Apr 6, 2016

Most significant numbers:

android support 20573 + google libs: 6099
wpandroid itself + subprojects (editor, stats, etc.): 11877
kotlin runtime: 6603
helpshift: 4071
simperium: 955 + koushikdutta (async android): 2794
apache commons: 2396
crashlytics: 1013 + fabric: 1188
mixpanel: 1716

@maxme
Copy link
Contributor

maxme commented Apr 6, 2016

Adding proguard shrink mode helps to kill ~25K methods, but it adds ~15 seconds compile time. After proguard:

Overall method count: 38472

android support 12628 + google libs: 3043
wpandroid itself + subprojects (editor, stats, etc.): 11030
kotlin runtime: 139
helpshift: 3293
simperium: 762 + koushikdutta (async android): 1341
apache commons: 102
crashlytics: 699 + fabric: 797
mixpanel: 1273

Conclusions:

  • WPandroid count before / after is almost the same (no room for improvement here),
  • Stripping android support and google libs is the major win (13K).
  • Helpshift count seems huge even after shrinking.
  • We're using very few Kotlin runtime and Apache commons methods.
  • We don't want to add 15 secs to each debug build 😢

I'll try to enable the new build tool chain (Jack and Jill) for debug builds, from the doc:

JACK has shrinking and obfuscation support and uses proguard configuration files to enable shrinking and obfuscation features.

Plus, it should make the whole build step faster.

@hypest
Copy link
Contributor Author

hypest commented Apr 6, 2016

Will close this since we got some headway by #3927

@hypest hypest closed this as completed Apr 6, 2016
@hypest
Copy link
Contributor Author

hypest commented Apr 6, 2016

Reopening so to keep an eye on it.

@sendhil
Copy link
Contributor

sendhil commented Jun 13, 2016

Man... Helpshift sure has a lot of methods ;).

nbradbury added a commit that referenced this issue Jun 22, 2016
oguzkocer pushed a commit that referenced this issue May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants