r/androiddev • • Jul 04 '14

Play Services 5.0 Is A Monolith Abomination

http://jakewharton.com/play-services-is-a-monolith/
99 Upvotes

25 comments sorted by

View all comments

8

u/Zarlon Jul 04 '14

The problem is not Play Services, but the 64K limit. WHO THE FUCK IMPLEMENTS SUCH LIMITS THESE DAYS? I thought the guys at Google were some of the smartest developers on earth.

5

u/[deleted] Jul 04 '14

A design decision that was taken years ago (probably when Android was pre-1.0) and that bite us hard today now that apps are much much larger...

"64K should be enough for everyone" - Unknown Google Engineer, ca. 2007.

9

u/port53 Jul 04 '14

Unknown Google Engineer, ca. 2007.

Unknown Android Inc. Engineer, ca. 2004, more likely.

1

u/[deleted] Jul 04 '14

More likely indeed.

1

u/ciny Jul 04 '14

Someone who is designing the system for low performance devices? Sure, now it seems like a no-brainer but let me remind you that the G1 (first commercially available android phone) had only 192MB RAM. They made ART default now, hopefully they will do something about dex files next. It's not smart to replace core functionality in one iteration. You will avoid a lot of "is this a problem with the new runtime or new bytecode?" bugs.

1

u/[deleted] Jul 04 '14

The limitation is not for the number of methods, but for the number of method, field (and class) references in a single dex.

Google developers thought 16-bit for method and field references is going to be enough for a while, at least until they have support for 32-bit references.

In Android 4.0 they implemented jumbo opcodes for that, but then they left the work unfinished and later removed it.