• 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: NSCalendarDate to be deprecated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCalendarDate to be deprecated


  • Subject: Re: NSCalendarDate to be deprecated
  • From: Ryan McGann <email@hidden>
  • Date: Thu, 21 Aug 2008 23:00:38 -0700

As written, 70 microseconds. When I set the calendar's time zone to GMT, the
time drops to 43 microseconds. Since my app will only work with dates in
GMT, this is a plus. Even so, 40 microseconds is far slower than the 7 - 8
microseconds offered by -[NSCalendarDate dayOfYear]. Unless someone has
another offering, I plan to file a bug report on this issue. This
calculation is part of an animation loop, so the performance hit is
important.
Sorry to jump in late, but I am just now getting around to reading about 5 days worth of email. Did you try caching the NSCalendar creation call? I believe we had a similar performance issue with CFCalendar (which no doubt shares its implementation with NSCalendar), and I found out with Shark and fs_usage that each CFCalendarCreate call results in many (very large) region data files being read into memory. <sarcasm>Turns out reading several megabytes from the filesystem is expensive</sarcasm>, so caching the CFCalendarCreate resulted in a big performance gain. Not sure if NSCalendar implements any caching on its own, but you might give it a shot.

Ryan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSCalendarDate to be deprecated
      • From: Tom Bernard <email@hidden>
  • Prev by Date: Re: NSTableColumn not usable with binder of class NSTextValueBinder?
  • Next by Date: Re: !foo vs foo == nil
  • Previous by thread: Re: NSCalendarDate to be deprecated
  • Next by thread: Re: NSCalendarDate to be deprecated
  • Index(es):
    • Date
    • Thread