[问题] WIFI Suspending all Thread及GC Freed问题

楼主: mouse52055   2016-07-07 18:34:54
请问
我目前在做WIFI APP(TCP Socket)
接收资料的方式是在Thread中跑 while ((length = in.read(b)) > 0)
(in是BufferedInputStream)
但是我在执行时Log都会一直跑Suspending all threads took和GC freed,如下列Log,不晓得这样在程式执行中是否会有影响?
W/art: Suspending all threads took: 15.001ms
W/art: Suspending all threads took: 5.784ms
W/art: Suspending all threads took: 35.113ms
I/art: Background partial concurrent mark sweep GC freed 205782(7MB) AllocSpace objects, 0(0B) LOS objects, 38% free, 25MB/41MB, paused 6.996ms total 60.501ms
I/art: Background partial concurrent mark sweep GC freed 208097(7MB) AllocSpace objects, 0(0B) LOS objects, 38% free, 25MB/41MB, paused 5.866ms total 53.566ms
I/art: Background sticky concurrent mark sweep GC freed 231047(8MB) AllocSpace objects, 0(0B) LOS objects, 24% free, 25MB/33MB, paused 6.354ms total 85.863ms
会有多个Client连接近来,并每秒传送20笔左右的资料(每笔 1412Byte)至APP做显示功能
主要的问题是,(Suspending all threads took)和(GC freed),是否会影响App的流畅度,是否有解决的方法?已爬过网络上很多文章,但是还是不知道该怎么解决。

Links booklink

Contact Us: admin [ a t ] ucptt.com