Jimmymp1632 / alogcat

Automatically exported from code.google.com/p/alogcat
0 stars 0 forks source link

to many GC_EXTERNAL_ALLOC log messages. #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start aLogcat
2. Wait for some log messages to appear
3. Scroll

What is the expected output? What do you see instead?
I do see the expected output.
But aLogcat also shows a lot of these logs:

11-22 10:53:49.232: DEBUG/dalvikvm(353): GC_EXTERNAL_ALLOC freed 39K, 56% free 
2708K/6151K, external 3584K/3600K, paused 39ms

This makes it hard to follow the other logs.

What version of the product are you using? On what operating system?
aLogcat v2.3.2
Android v2.3.3
Desire/AndroidEmulator

Please provide any additional information below.

Original issue reported on code.google.com by tielensj...@gmail.com on 22 Nov 2011 at 10:15

Attachments:

GoogleCodeExporter commented 9 years ago
This makes alogcat almost unusable. Every time I scroll the window gets flooded 
with GC_EXTERNAL_ALLOC statements. 

Sometimes it'll get stuck and completely flooding the screen after I stop 
touching it. It has literally filled the entire scrollable area with those 
messages a few times.

Samsung Galaxy Tab
Android v2.3.5
aLogcat v2.3

Original comment by E.Joseph...@gmail.com on 19 Dec 2011 at 12:55

GoogleCodeExporter commented 9 years ago
Preface:  I am in no way associated with aLogCat development.  I just happened 
to stumble upon this issue.

This is not a defect in the logger and a filtering option is provided.  The 
following procedure will remove the garbage collection log entries from your 
aLogCat output:
1) While in aLogCat, press the Menu key on your device and tap Filter
2) Tap the check-box next to "Apply as regular expression?" to enable it
3) In the text box input the following exactly:  ^(?!.*(dalvikvm|GC)).*$
4) Tap Okay and your screen will be updated sans garbage collection spam.

Original comment by Randen.S...@gmail.com on 20 Dec 2011 at 6:13

GoogleCodeExporter commented 9 years ago
Android is (very) new to me so I don't know if this is the perfect solution 
but...
Lets give it a try.

I think the background of the listview is the problem.
As explained in the following resource.
http://developer.android.com/resources/articles/listview-backgrounds.html

Removing this code from log.xml enables cacheColorHint optimization.
android:cacheColorHint="#00000000"
By enabling this optimization the garbage collection is drastically reduced.

The default cacheColorHint is black so we need set the cacheColorHint to the 
desired value. I did this by adding this line to the onStart() method of 
logActivity.java.
mLogList.setCacheColorHint(mPrefs.getBackgroundColor().getColor());

Greetz

Original comment by tielensj...@gmail.com on 20 Dec 2011 at 12:00

GoogleCodeExporter commented 9 years ago
thanks for looking into this folks. i will try out that suggestion and publish 
a new version if all is good.

Original comment by jeffrey.blattman@gmail.com on 22 Dec 2011 at 1:53

GoogleCodeExporter commented 9 years ago
fixed in 2.4.

Original comment by jeffrey.blattman@gmail.com on 29 Dec 2011 at 3:47