Live data from Hacker News

65535 interfaces ought to be enough for anybody

aakinshin.net

11–20 of 82 posts

Re: 65535 interfaces ought to be enough for anybody

#13
post #2

Android is worse — it limits number of methods to 65535 (but has hacks to workaround it) https://developer.android.com/studio/build/multidex.html

A coworker mentioned that multidexing also take ages and uses huge amounts of memory.

Are there any legitimate use cases for that many methods?

Re: 65535 interfaces ought to be enough for anybody

#15
post #13

Earlier quoted context omitted.

A coworker mentioned that multidexing also take ages and uses huge amounts of memory.

Are there any legitimate use cases for that many methods?

I mean, it means you can't pull in Scala. I mean, you can, but pull in enough bloated Java 3rd party libraries and you might be hitting that limit pretty quickly. Google broke Google Play Services out into a large number of small dependencies once they were past the 15k method mark. Mind you, certain compilation settings will totally strip out unused methods, but it's still annoying.

Re: 65535 interfaces ought to be enough for anybody

#16
post #13

Earlier quoted context omitted.

A coworker mentioned that multidexing also take ages and uses huge amounts of memory.

Are there any legitimate use cases for that many methods?

IIRC the Facebook app had many more than that at one point, and had to use multi-dexing. Not sure if that's still the case.

I've also heard that scala apps on Android can sometimes hit the limit, because pulling in the scala stdlib greatly bloats the method count.

Re: 65535 interfaces ought to be enough for anybody

#17
post #16
post #13

Earlier quoted context omitted.

Are there any legitimate use cases for that many methods?

IIRC the Facebook app had many more than that at one point, and had to use multi-dexing. Not sure if that's still the case. I've also heard that scala apps on Android can sometimes hit the limit, because pulling in the scala stdlib greatly bloats the method count.

Wasn't that the initial reason behind splitting off Messenger into a separate app?

Re: 65535 interfaces ought to be enough for anybody

#19
post #2

Android is worse — it limits number of methods to 65535 (but has hacks to workaround it) https://developer.android.com/studio/build/multidex.html

A coworker mentioned that multidexing also take ages and uses huge amounts of memory.

Why do people always talk about multidexing like it's such a nightmare?

https://developer.android.com/studio/build/multidex.html

It's really not that bad, It only gets a little squirrely if you're trying to support super old android versions.

Post reply on HN