All things performance, for all Android developers
See all
Members (27,098)
Colt McAnlis's profile photo
Android Developers's profile photo
3BLAZINMICS's profile photo
Abdelrahman Ibrahem's profile photo
MS info solutions's profile photo
Alan Magalhães Lira's profile photo
Benjamin Cheng's profile photo
Emmanuel Vinas's profile photo
Genki Prayogo's profile photo
Sven Johannsen's profile photo
ren kangke's profile photo
Ryan Moelter's profile photo
Syed Immad's profile photo
malika taneja's profile photo
Realm's profile photo
Toran Singh's profile photo
abhishek jain's profile photo
Kormada ELI's profile photo
Uren “Stonecold” Patel's profile photo
KENNY HAYNES's profile photo
Toni Jones's profile photo
Parag Sharma's profile photo
Armando Sudi's profile photo
Mihir Bajaji's profile photo

Stream

Join this community to post or comment

Antonin Carette

Discussion  - 
 
Hi!
We try to get some log traces for a given Android application.
We are using the "profile" to get log traces, and Traceview to analyze them.
Currently, we have some troubles because it's impossible to get those logs in the output, only in a output file.
Also, the buffer is limited to 8Mb.
Do you know a program to get log traces like "profile", but using the standard output please, instead of create and append logs in a file?
1
Add a comment...
 
Cool for UX and also performance feel
 
Use OkHttp for everything and "improve UX" !

http://omgitsmgp.com/2015/12/02/effective-okhttp/
Effective OkHttp. 02 Dec 2015. OkHttp was an invaluable library when developing the Android app for Khan Academy. While its default configuration offers significant utility, below are some steps we took for increasing the resourcefulness and introspective power of OkHttp: ...
11
6
Add a comment...

Draško Sarić

Discussion  - 
 
How dangerous is the following regarding memory leaks and performances and why?

Code snippet:
http://pastie.org/10909722






public class MyApplication extends Application { public static Context context; @Override public void onCreate() { //... context = getApplicationContext(); <--- This one } ... } //Later in some helper class public class HelperClass { public static doSomething() ...
2
Christophe Beyls's profile photoDraško Sarić's profile photo
9 comments
 
+Christophe Beyls I guess I should stick with that. Was afraid that would be the answer before posting question. :/
Add a comment...

Colt McAnlis
moderator

Discussion  - 
 
ClassyShark (the Android APK inspector tool) just uploaded a new user #perfmatters
classyshark-user-guide - ClassyShark User guide
37
8
David Poole's profile photoRudolf Hladik's profile photo
3 comments
 
do you get too many redirects error on www.classyshark.com too?
Add a comment...

Madhan Kumar

Discussion  - 
 
Why asynctask take too much time for a http request?
1
Elmar Rhex Gomez's profile photovishal gaware's profile photo
2 comments
 
Async task runs on background thread.. in case your device has too many background tasks to perform the http request will take a lot time to complete.. but if you have less background tasks to perform the async task will perform better..
Add a comment...

Clive Sargeant

Discussion  - 
 
Need to do stuff in the background, like playing music or downloading files? Use a Service to do the work in the background while your user plays on.

Services can work for you in the background, playing music, processing files or interacting with databases...

Check out this beginners tutorial that tells you all about Services, what they are, when to use them. Includes links to tutorials showing you how to use the different Services in your apps. Check the tutorial out now!
(adsbygoogle = window.adsbygoogle || []).push({}); At your Service: Using Services Services are app components that you can use to do work in t...
5
1
Add a comment...

Colt McAnlis
moderator

Discussion  - 
 
Converted all the Android Performance Patterns videos on threading into an official article.

(you can see the videos here, if you like them better https://goo.gl/4ZJkY1 :)

#perfmatters
39
13
Krishna Murthy's profile photo
 
Hi ,i don't have much idea on Design patterns which are more useful in developing android apps .
Can u plz share the pdf links where i can get.Many Thanks in advance

Add a comment...

akshay patel

Discussion  - 
 
 
Eliminate all findViewById boilerplate codes and replace it with just a single line of code no matter how many Views you have in the layout.

Goodbye findViewById. We will miss you. And Long Live Data Binding Library !

#android #androiddev
findViewById is one of the most annoying boilerplate code in Android application development. This part of code unnecessarily requires bunch of line of codes and can easily cause an expected beha
14
2
Kerner Yu's profile photo
 
how can i browser it in china.
Add a comment...

Michał Z.

Discussion  - 
 
Hello,

I have a case where I need to draw two large bitmaps on canvas. Both bitmaps are constantly moving. I'm looking for some ways to improve drawing performance. In GPU profiling tool the red bars(execution time) are high. I can't load a full size bitmap because during draw the system tells me that it doesn't fit in to a texture. So I'm loading a smaller ones and during draw I'm using matrix to translate and scale them up on the gpu. I can't use any other config than ARGB8888 because my bitmaps contain gradients.

Is there anything else I can do? Any tips/tricks? Maybe SurfaceView will perform better?
2
SmallBing Tang's profile photo
 
u can use bitmapregiondecoder,ir use the library subsampling-scale-image-view
Add a comment...

Sarabjeet Singh

Discussion  - 
 
Need to create a real Time Location tracking Service which will update the user current location after some user_defined time interval and if the user is at someplace where network is weak then the app should try to extend the duration of executing the positioning task to save power and battery life.

So far I came up with a solution of using LocationServices.FusedLocationAPI for locations updates and
GCM Network manager to see the network strength, for increasing the time interval for location request.

Does anyone have any other better approach???
1
Andrew Moore's profile photoZeki Gulser's profile photo
2 comments
 
It will be nice to use awareness API though it's not location specific service. So your code base will possibly be filled with the unused services.
Add a comment...

About this community

This community focuses on discussion, resources, and techniques for improving PERFORMANCE of the Android Applications you are developing. See the full list of videos here : goo.gl/4ZJkY1 If you have general development questions, please direct them to the main ANDROID DEVELOPERS community, here http://goo.gl/UgBzk

krishna kumar

Discussion  - 
 
Does Wi-Fi P2P use TCP/HTTP ? I am thinking on what would be the fastest network access protocol (TCP/HTTP or something else) over Wi-Fi on Android ? Do I fire up HTTP server (TomCat or is Php better ?) or what other protocol can be even faster if at all ? +Android Developers +Android Developers
2
krishna kumar's profile photo
5 comments
 
+Avinash Ananth Narayan R - Wi-Fi P2P aka Wi-Fi Direct ! - All I wanted was to correct the direction of discussion - I wasn't interested in APIs - rather protocols that WiFi P2P (again aka Wi-Fi Direct at least for this discussion) supports ? - if supported which is the fastest - I am still unsure if what I wrote to +Ian Lake in my above comment on protocol is what I really want/understand. Thanks again.
Add a comment...

Aalap Patel

Discussion  - 
 
Can I obtain long and lat of my device without gps on?
1
Aalap Patel's profile photoStephen Charman's profile photo
4 comments
 
They shouldn't need to turn GPS on, no. They will need to give the app permissions and have the correct device settings: https://developer.android.com/training/location/change-location-settings.html
Add a comment...

pankaj negi

Discussion  - 
 
how we can improve request and response time using android code
2
2
Christophe Beyls's profile photoDarren Steven's profile photo
3 comments
 
First step is to measure current response times. How much is network, server, client etc. Then you can work out what can be optimized. Otherwise you can spend a lot of time optimising the wrong thing for no benefit. 
Add a comment...
 
Good morning,
I have an LG G3 with RR 5.7.0 and aCC 1.6 kernel, the internal card have the file system that works in f2fs mode. Taking the benchmark two card values ​​are those of the image. My opinion are low, given that the external sd from the manufacturer to 150Mb. How can I increase the speed of memory cards? Thank you
 ·  Translate
1
Add a comment...

Michael Guntli

Discussion  - 
 
We accepted the challenge to build our own custom device (custom industrial hardware, custom Android BSP and performance aware app-programming) to visualize real-time data sampled at 200Hz!

How do you like my talk about looper threads and real-time data visualization at Droidcon Berlin?
https://www.youtube.com/watch?v=QGqzJjJAhBU

+Colt McAnlis Thank you for your awesome videos and tipps!
7
2
Add a comment...

Colt McAnlis
moderator

Discussion  - 
 
What hidden data is bloating your image files?
I took a quick look inside some files that were created using Photoshop's "Save for web" feature. Turns out there's an extra ~1k of text data that's added to each file.
This is why it's extremely important to always use some final-step tool that strips out this kind of information before serving it to your users.

#perfmatters
If you had a chance to catch my Google IO talk : Image compression for Android Developers, then you’ll be familiar with this little friend…
33
9
Add a comment...

Kedar Kalkote

Discussion  - 
 

I have made one app the apk size of the app is 5Mb but taking more than 50 mb in phone how can i decrease that space anyone knows that ??
4
Kedar Kalkote's profile photoEfeturi Money's profile photo
11 comments
 
/sub I want to know your findings +Christophe Beyls
Add a comment...
 
 
I wrote a post for Facebook's engineering blog about performance optimization on Android.

We were using a HashSet for holding Long and Int values. After checking our memory footprint, we decided we can avoid all the autoboxing by creating a more optimized data structures.

In this post you can read how we found the problem, the options we had and what lead us to the chosen solution.

#perfmatters #androiddev

https://code.facebook.com/posts/857070764436276/memory-optimization-for-feeds-on-android/
Creating an optimized data structure led to a reduction in allocations and an overall improvement in memory efficiency.
13
2
Christophe Beyls's profile photo
 
I simply use a SparseBooleanArray where values are all "true" when I need a set of integers on Android.
It consumes a bit less memory than your solution which uses SparseArrayCompat because a an array of booleans uses 1 byte per item while an array of object references uses 4 bytes per item.
Add a comment...

Ryan Chen

Discussion  - 
 
how can I query the Bitmaps from my project on MAT? for example,
I want to detect the biggest one or top 20 Bitmap.
1
Riccardo Ciovati's profile photo
 
Type "Bitmap" in the Regex field, left click on "android.graphics.Bitmap" -> "List objects" -> "With incoming reference". (see gif here: http://gifyu.com/image/VJt). Alternatively you can use the analyzer built-in in Android Studio which gives you also a bitmap preview.
Add a comment...