• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBundle problem accumulates execution time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSBundle problem accumulates execution time
      • From: j o a r <email@hidden>
References: 
 >NSBundle problem accumulates execution time (From: Michael Monscheuer <email@hidden>)
 >Re: NSBundle problem accumulates execution time (From: Jason Harris <email@hidden>)
 >Re: NSBundle problem accumulates execution time (From: Kevin Ballard <email@hidden>)

  • Prev by Date: Re: NS(Array)Controller and To-Many Relationships (how to add objectsfrom one to another)
  • Next by Date: Re: Newbie wallowing in documentation
  • Previous by thread: Re: NSBundle problem accumulates execution time
  • Next by thread: Re: NSBundle problem accumulates execution time
  • Index(es):
    • Date
    • Thread