[Adium-devl] "Debug logger" plugin
Peter Hosey
boredzo at gmail.com
Fri Feb 9 19:43:07 UTC 2007
On Feb 09, 2007, at 11:11:43, Eric Richie wrote:
> What about a stand alone plugin that could be downloaded only by
> those wanting/needing to use it and thus could turn any build into
> a "test build"?
Isn't that what I suggested?
Evan's and Augie's objection is that this would slow down Adium for
average users, since you still need code in Adium to do the debug
logging, regardless of whether it goes anywhere or not.
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
With the debug logger plug-in not installed, none of these would
happen. All that would remain is:
[[AIDebugLoggerTotallyMadeUpClassName sharedLoggerTotallyMadeUp]
totallyMadeUpLogMethodWithFormat:@"%@", @"foo"];
+ (AIDebugLoggerTotallyMadeUpClassName *)sharedLogger {
return nil;
}
The debug logger plug-in would then have a category that provides the
real class implementation, complete with a functioning +sharedLogger.
When the plug-in is absent, +sharedLogger always returns nil; since
messages to nil are basically free, the total cost consists of:
* 1 message to non-Nil (the class)
* 1 function whose body is simply “return nil;”
* 1 message to nil
I don't think that this slow-down will add up to anything noticeable
by a human.
___________________________________
\ Peter Hosey / boredzo at adiumx.com
PGP public key ID: C6550423 (since 2007-01-01)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070209/ad705c98/attachment.sig>
More information about the devel
mailing list