I see~~ I didn't expect the overhead of this makes the final system not usable. I guess you guys must have chosen the current way for a reason ^_^
On Apr 17, 9:57 am, Dianne Hackborn <hack...@android.com> wrote: > It's actually not as useful as you might think, because turning on all of > the possibly interesting logs causes so much work to happen (even though the > final string won't be shown by logcat) that the system ends up being not > that usable. We actually started down this path, which is where the > Config.LOGV constant comes from, but bailed that ever being true when it > became clear it didn't work well. > > On Fri, Apr 17, 2009 at 12:34 AM, 袁嵩 Yuan Song <ilovewu...@gmail.com> wrote: > > > > > > > > > > There's a big difference between having verbose logging included but > > > disabled, and having it excluded. The LOG_NDEBUG and Config.LOGV (or > > > local "verbose log enable") defines cause the messages to not be > > > compiled in at all, which makes the code faster and smaller. > > > > This is particularly important in Java, where something like Log.v > > > (TAG, "The cow says " + moo) causes a bunch of allocations and > > > StringBuilder activity even if the Log.v call eventually does nothing. > > > Yes I totally agree. But for develop and debug purpose, it can be > > worthy of having all verbose messages compiled (although it must be > > decreasing the performance significantly), and selectively view > > verbose log from specific modules by "adb logcat [MODULES_LIST]". > > > One annoying thing I found out during debugging is I have to manually > > make verbose messages compiled for each single source file. As I trace > > the bug, I need to re-compile all the time. Anyway, this may not be > > necessarily a bad thing, as it can force me to be more cautious to > > analyze and choose the right source files to be compiled with verbose > > messages. > > > Thanks for the info about the StringBuilder activity. I haven't > > thought of that. > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---