While running my android application the LogCat writes warn and info logs, do they affect the performance of my application or simply need to ignore them?
It happens when i try to write and read from an audio file for which i use ByteArrayOutputStream() and i also use AsyncTask for updating the GUI.
From the LogCat i understand that it is something regarding the threads, but how it causes?
please look at the logcat below
05-04 16:41:17.645: W/dalvikvm(2030): threadid=3: spin on suspend #0 threadid=23 (h=4332248)
05-04 16:41:17.645: W/dalvikvm(2030): dumping state: process - 2030
05-04 16:41:17.645: I/dalvikvm(2030): "main" prio=5 tid=3 RUNNABLE
05-04 16:41:17.645: I/dalvikvm(2030): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b268 self=0xbd00
05-04 16:41:17.645: I/dalvikvm(2030): | sysTid=2030 nice=0 sched=0/0 cgrp=default handle=-1344001384
05-04 16:41:17.645: I/dalvikvm(2030): at com.m2.gui.player.readData(Native Method)
05-04 16:41:17.645: I/dalvikvm(2030): at com.m2.gui.player.onCreate(player.java:149)
05-04 16:41:17.645: I/dalvikvm(2030): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-04 16:41:17.645: I/dalvikvm(2030): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
05-04 16:41:17.645: I/dalvikvm(2030): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
05-04 16:41:17.645: I/dalvikvm(2030): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-04 16:41:17.645: I/dalvikvm(2030): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-04 16:41:17.645: I/dalvikvm(2030): at android.os.Handler.dispatchMessage(Handler.java:99)
05-04 16:41:17.645: I/dalvikvm(2030): at android.os.Looper.loop(Looper.java:123)
05-04 16:41:17.645: I/dalvikvm(2030): at android.app.ActivityThread.main(ActivityThread.java:4363)
05-04 16:41:17.645: I/dalvikvm(2030): at java.lang.reflect.Method.invokeNative(Native Method)
05-04 16:41:17.645: I/dalvikvm(2030): at java.lang.reflect.Method.invoke(Method.java:521)
05-04 16:41:17.645: I/dalvikvm(2030): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-04 16:41:17.645: I/dalvikvm(2030): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-04 16:41:17.645: I/dalvikvm(2030): at dalvik.system.NativeStart.main(Native Method)
05-04 16:41:17.645: I/dalvikvm(2030): "AsyncTask #4" prio=5 tid=23 RUNNABLE
05-04 16:41:17.645: I/dalvikvm(2030): | group="main" sCount=1 dsCount=0 s=N obj=0x44f2c048 self=0x4219c0
05-04 16:41:17.645: I/dalvikvm(2030): | sysTid=2280 nice=10 sched=0/0 cgrp=bg_non_interactive handle=4332248
05-04 16:41:17.894: I/dalvikvm(2030): at com.m2.gui.player$progressUpdate.doInBackground(player.java:-1)
05-04 16:41:17.894: I/dalvikvm(2030): at com.m2.gui.player$progressUpdate.doInBackground(player.java:1)
05-04 16:41:17.894: I/dalvikvm(2030): at android.os.AsyncTask$2.call(AsyncTask.java:185)
05-04 16:41:17.894: I/dalvikvm(2030): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
05-04 16:41:17.894: I/dalvikvm(2030): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
05-04 16:41:17.894: I/dalvikvm(2030): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
05-04 16:41:17.894: I/dalvikvm(2030): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
05-04 16:41:17.894: I/dalvikvm(2030): at java.lang.Thread.run(Thread.java:1096)
05-04 16:41:17.912: W/dalvikvm(2030): threadid=3: spin on suspend resolved in 515 msec
Logging on the actual device use rolling mechanism, buffer size is 64KB, From my points of view, it should not cause much affect on you application performance.
The logcat you posted is basically verbose message from underlying dalvikvm about thread running info and states, I don’t see any problem related to you application here and I think you can simply ignore it. If you connect a android phone to you development machine then perform some action and check the out, you can see the system log quite a lot of verbose message like screen turnned on/off, activity created/destroyed and etc.