Re: NSBundle problem accumulates execution time
Re: NSBundle problem accumulates execution time
- Subject: Re: NSBundle problem accumulates execution time
- From: Bob Ippolito <email@hidden>
- Date: Mon, 7 Feb 2005 00:23:10 -0500
On Feb 6, 2005, at 1:46 AM, Kevin Ballard wrote:
On Feb 6, 2005, at 1:12 AM, Jason Harris wrote:
Well, every time through your loop, it's been a longer time interval
since time1 was set. I think you want to set time1 to the new
interval in your loop to come up with a real test.
Actually, if you try it, he is right. The time is increasing, even if
you do set time1 in the loop.
Well his code is pretty bogus because he doesn't have a separate pool
for the outer loop. I do believe there is some kind of bug in
+[NSBundle bundleForClass:] though - the retainCount explodes if you
use it for more than one class somehow. I suggest caching the results
in a map table or NSDictionary, +[NSBundle bundleForClass:] can't
really be trusted. PyObjC 1.3 (svn trunk) actually swizzles this
method to provide its own cache and additional functionality (allowing
the class to report its bundle) for certain implementations of NSBundle
that it doesn't trust.
-bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden