Pricing Request a Demo
Home / Lollipop
Enjoy the best mobile SDKs news, tips & tricks, sent to you by mail

Two Years of Multidexing: Is the 65K Limit Still a Big Deal?

October 20, 2016 8:42 AM

I still remember when I saw my first multidex app. It was almost two years ago and ho so rare. It was an almost religious experience – seeing something you didn’t think could exist with your very own eyes. And yet today I’m surprised when I stumble upon an app and it only has one dex file. Seriously, it’s like finding an oasis in the Sahara. A sight for sore eyes.

Which is why I was so surprised when our saleswoman told me about a meeting she had, where the developers in question specifically asked about it. They were determined to stay single dex no matter what.

You see, silly me, I thought the 65k limit was like one of those things you read about in history books or see in old movies. But it turns out I was living in a bubble. But hey, can you really blame me? Even Android’s own new compiler – Jack – refers to it in both code and documentation as “legacy”.

Which leads me to really think – is the 65K limit in Android still a big deal?

Continue Reading

The JIT of N: How Android’s ART Will Be Faster?

May 30, 2016 1:18 PM

If you’ve read some of my posts in the past, you know I have a near-obsession with mobile app start time. And I know I’m not alone there. It’s this generation “We can lend a man on the moon” most favorite complaint – It’s 2016, how can it be we’re still waiting for apps to launch?

Well, looks like indeed I’m not alone. I’m in good company with the nice folks over at Google / Android, who are doing some nice things to improve app start time.

One of the most interesting things I’ve heard in both keynote and sessions at Google I/O two weeks ago was how the ART virtual machine has improved and how well it’s going to affect both start time and system update time. Alongside the introduction of Android Instant Apps, it looks like Android is looking to dispose of any unnecessary waiting time.

Continue Reading

The 3 Surprises Hidden in Your App’s Start Time

April 13, 2016 2:59 PM

What more is there to say about the mobile app start time? I’ve already written about it in the past, describing our research about what makes up the time from the moment you click on an app’s icon until you get a visual feedback.

But when Samsung’s Innovation Center in Tel-Aviv offered us the chance to record a podcast, we knew it had to be about the start time. After all, listening is better than reading, right? So Ronnie Sternberg, Maya Mograbi and myself headed over to Samsung offices to embark on a conversation about the mobile app start time. And what can I tell you? It was fun!

Some interesting points were made, not all of which were covered in my original post…

SafeDK is broadcasting from TLV Samsung’s innovation center , suppprting Israeli High Tech professionals, communities, entrepreneurs and startups.

Continue Reading

Solving Android’s 65K Limit (Part 2): The Lollipop Generation

June 23, 2015 3:57 PM
 

If you’ve read my previous post about breaking Android’s 65K limit (and if you hadn’t, what are you waiting for?), you’re already pretty familiar with Android’s 65K limit, why it exists and how to solve it. Which means you’ve been itching to know what the future of multidexing has in store (and what does a tooth-fairy-supporting candy-on-a-stick has to do with it).

As small recap to start with, if you will:

Since its’ inception, Android ran a virtual machine called Dalvik. The Dalvik VM ran a compiled file called dex (Dalvik Executable) which has a tiny limitation – even though the file contains the entire code for the application, its id field was limited to 4 hexadecimal digits. So when an application had over 0xffff methods (=65,536 in decimal), the dex file simply could not be created, meaning applications with so many methods could not be created.

That posed a problem as applications became more and more diverse and complex, and as many developers looked to speed their development process by not doing everything from scratch, but by using more and more third-party libraries (SDKs) that help them achieve their goals faster.

Android released a support library which helps you create an application with over 65K methods. In a nutshell, the compilation process to of Java bytecode to dex was enhanced so that once the limit is reached, a secondary dex file is created. The support library then offered a static method Multidex.install which is called when the app is being launched and tells the class loader to look for methods in places other than the one dex file is expects.

However, we’ve seen the solution is not ideal. Issues ranging from prolonged compilation time to a static process repeating every single time the app is launched made the multidex solution a workaround compromise rather than something Android developers could truly trust. What might be the most burning issue is the lack of ability to predex (compile the not-likely-to-change parts of your app to dex only once; Again, for more information, take a look at part 1).

Continue Reading