A blog site for teams who care about building great apps

Eight Ways Your Android App Can STOP Leaking Memory

In part one of this blog post “Eight Ways Your Android App Can Leak Memory”, we went over eight different ways your code can cause your Android application to leak memory. Specifically, all eight leaks were leaking an Activity instance, which is particularly dangerous because activities have a very large...

Read More
App Diets are not a Fad

In our last post we explored an architecture/library selection that would lead to nearly perfect startup times. Today I wanted to explore another type of performance optimization: APK size. A smaller APK results in faster resource lookup and faster reflection. Image optimization, an important way to cut down APK size,...

Read More
Eight Ways Your Android App Can Leak Memory

One advantage of a garbage-collecting-language like Java is that it removes the need for developers to explicitly manage allocated memory. This reduces the likelihood of a segmentation fault crashing the app or an unfreed memory allocation bloating the heap, thus creating safer code. Unfortunately, there are other ways that memory...

Read More
Five Common Issues That Slow Down Your App

In the last couple of months, we’ve been describing a handful of common issues that slow down your Android app based on our analysis using NimbleDroid. We conclude this series of posts by summarizing the issues here. Java reflection. Reflection is, of course, an extremely useful aspect of Java and...

Read More
Performance Problems in Libraries and SDKs

It’s difficult to imagine modern android apps that don’t implement some external libraries or SDKs. After all, most apps have to leverage some combination of network image loading, crash tracking, advertisement, or analytics libraries and SDKs. It makes sense - developers shouldn’t have to reinvent the wheel (several wheels, actually)...

Read More
Pushing the Limits of App Startup Time

It’s easy to make a tiny app fast. It’s more challenging when you need to deal with the complexities required by most apps: data caching, json parsing, immutability, dependency injection, and a slew of support libraries.It’s still possible to minimize startup time, even when you’re following modern development practices such...

Read More
Why Is ClassLoader.getResourceAsStream So Slow in Android?

Through our extensive analysis at NimbleDroid, we’ve picked up on a few tricks that help prevent monolithic lags in Android apps, boosting fluidity and response time. One of the things we’ve learned to watch out for is the dreaded ClassLoader.getResourceAsStream, a method that allows an app to access a resource...

Read More
Five Lesser-Known Ways to Hang Your Main Thread

By now, most Android Developers already know that the main thread of an app is the one that handles user interaction, and should consequently be considered off-limits for time-consuming work. In general, any method invocation that causes the main thread to hang for 16*N milliseconds will lead to N dropped...

Read More
Comparing the Performance of Dependency Injection Libraries

The dependency injection (DI) has become an increasingly popular tool in Android development, and for good reason. Injections reduce the amount you have to code (and hence, debug), facilitating the creation of better apps and a smoother development process. While it may be tempting to toss in dependencies to a...

Read More
How Slow is Reflection in Android?

(So far we’ve analyzed a lot of apps and discovered a handful of issues that significantly slow down many apps. Starting from this post, we’ll describe these issues one by one.) Reflection is, of course, an extremely useful aspect of Java and Android development. Yet it turns out that reflection...

Read More
How to Make Your Application Fluid

In a previous blog post, we discussed the importance of monitoring your app’s performance. This time, we’ll show you exactly how to go about doing this. We’ve spoken with several developer teams from some of the most popular apps in the world, including WeChat and Yahoo News Digest, about the...

Read More