I'm trying to profile my app's memory allocations but android studio is taking very long time to fetch results of allocation recording (in fact it's been 45 min and ITS STILL FETCHING !!!)
-
Try restarting it – Akhil Dec 15 '17 at 16:38
-
1I did .. like 3 times – Hesham Haikal Dec 15 '17 at 16:39
-
you are only running one instance of Android Studio and you don't have Eclipse or ADB running at the same time in a separate window? – Sam Dec 15 '17 at 16:41
-
Yup , only android studio – Hesham Haikal Dec 15 '17 at 16:41
-
Well I guess I've to brainstorm every part of my app until I find the bugs .. I hate old fashioned ways – Hesham Haikal Dec 15 '17 at 16:51
-
The Android Profiler has performance issues. While [this issue](https://issuetracker.google.com/issues/68850784) may not be what you are experiencing, some of the suggestions in the comments might help. – CommonsWare Dec 15 '17 at 17:16
-
2It seems like this is still an issue with Profiler in 2019... – IgorGanapolsky May 02 '19 at 16:52
3 Answers
I had the same problem with Android Studio 3.2.1 and Samsung S5 on Android 6. I just used another device on Android 8 and allocations became visible. So, I guess, it depends on device or Android version.

- 328
- 1
- 3
- 14
-
-
Same problem here with AS 3.4 and a SGS5 too I'm using for testing. Weird! – Fran Marzoa May 17 '19 at 12:46
My profiler was stuck on "fetching" because the debugger was also started and it paused my app because it reached a breakpoint

- 369
- 3
- 10
One of the reasons that it could take a long time could be your method count been very huge, that by itself could be a memory issue if you got too many chained things in your code.
For example, you got class A
sending some data to class B
, let's say a username, and then class B
sends it to class C
et cetera... until it gets to class Z
You can break the chain by using a Singleton and make Z
and any other class to pull the username data directly from the source.
To determinate if this indeed is your problem, try running the tool on a new test project with few lines of code.

- 31,250
- 24
- 137
- 216