Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does logging slow down a production Android app?

Tags:

java

android

Before releasing my Android app to the marketplace, should I comment out all logs?

Log.d(tag, "example of a log")

If I leave them there, will the app run slower?

like image 612
JoJo Avatar asked Jun 22 '11 19:06

JoJo


People also ask

Does logging slow down application?

A well-written logging code offers quick debugging, easy maintenance, and structured storage of an application's runtime information. Logging does have its drawbacks also. It can slow down an application as it uses some CPU cycles and other resources (memory, etc).

Which log has highest priority in Android Studio?

The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE.

What is the use of log in Android Studio?

The Logcat window in Android Studio displays system messages, such as when a garbage collection occurs, and messages that you added to your app with the Log class. It displays messages in real time and keeps a history so you can view older messages.

What is logcat Android?

Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class. This page is about the command-line logcat tool, but you can also view log messages from the Logcat window in Android Studio.


1 Answers

Java doesn't support C#-style conditional compilation, so the parameters will always be evaluated. That includes any string concatenation and stuff you might be doing.

Short answer: yes.

like image 192
Blindy Avatar answered Sep 21 '22 10:09

Blindy