简体   繁体   中英

Speed-up application by remove code for writing logs?

I am trying to speed-up my application. Will it make my app significantly faster if I remove all the logs-code? Does it make a difference ?

My app writes lots of logs.

Log.v(TAG, "example android log");

I read this question , but it doesnt answer my question.

No, it won't make any visible improvements on your perfs.

Unless you're doing really bad things such as:

  • Non-stop logging (100x every frame)
  • String concatenations
  • toString() method calls
  • any object allocation

Maybe you could share some snippets of your logging code to see if there is anything wrong.

Depends on the functionalities of you Glass app. If your glass app is just a slideshow there are different aspects that needs to be taken care of than a Media Streaming app. Offcourse, reducing the number of log statements would help a bit in the performance but there are other significant points that should be taken into consideration.

Please refer to this official Google Document for more detail information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM