Timeline: Activity_launch_request time:65620
04-14 15:31:25.347: I/dalvikvm(3483): Total arena pages for JIT: 11
04-14 15:31:25.621: D/dalvikvm(3483): JIT unchain all for threadid=13
04-14 15:31:26.371: W/dalvikvm(3483): threadid=1: spin on suspend #1 threadid=13 (pcf=0)
04-14 15:31:27.122: W/dalvikvm(3483): threadid=1: spin on suspend #2 threadid=13 (pcf=0)
04-14 15:31:27.122: I/dalvikvm(3483): "main" prio=5 tid=1 RUNNABLE

 

JIT unchain all for threadid=19

04-14 15:33:28.638: W/dalvikvm(5595): threadid=20: spin on suspend #1 threadid=19 (pcf=0)
04-14 15:33:29.388: W/dalvikvm(5595): threadid=20: spin on suspend #2 threadid=19 (pcf=0)
04-14 15:33:29.388: I/dalvikvm(5595): "pool-5-thread-2" prio=5 tid=20 RUNNABLE

 

运行应用过程中多次调用While(!isComplete); 对线程进行阻塞,导致线程资源占用过高。修改为一下实现方式可以降低资源占用

while(!isComplete){

  try {

    Thread.sleep(100);
  } catch (InterruptedException e) {
  // TODO Auto-generated catch block
    Log.e(e);
  }
  continue;

}

 

相关文章:

  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-20
  • 2022-02-17
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案