[Adium-devl] "Debug logger" plugin
David Smith
catfish.man at gmail.com
Fri Feb 9 20:12:08 UTC 2007
What about #defining AILog to
if(debug) { realAILog(args); }?
The plugin could then just set debug to YES, while Adium would set it
to NO just before loading plugins. Branches are pretty cheap unless
you're doing really intense microoptimization.
David
On Feb 9, 2007, at 12:01 PM, Evan Schoenberg wrote:
>
> On Feb 9, 2007, at 2:43 PM, Peter Hosey wrote:
>
>> I'm not convinced that it's such a huge slowdown. I contend that
>> the slowness of the current debug logger comes from three sources:
>> * NSTextView (if the debug log window is open)
>> * File I/O (if write-to-file is turned on)
>> * String formatting
>
> My objection primarily is that the third source of slowdown you
> list is present for non-trivial debug messages even if messaging
> nil... As the arguments to [nil printThis:[foo returnAString]
> andThis:[bar returnAnotherString]] are evaluated before the do-
> nothing of nil happens. Is this based on a misconception? If it
> isn't, and debug logging were always compiled but not always
> active, we'd want to avoid debug logging which has any cost
> associated with generating the strings themselves.
>
> -Evan
> _______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
More information about the devel
mailing list