• 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: years:months:days:hours:minutes:seconds:sinceDate: really slow!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: years:months:days:hours:minutes:seconds:sinceDate: really slow!


  • Subject: Re: years:months:days:hours:minutes:seconds:sinceDate: really slow!
  • From: Itrat Khan <email@hidden>
  • Date: Wed, 21 Aug 2002 13:09:17 -0400

On Saturday, August 17, 2002, at 07:50 PM, David Sinclair wrote:

Has anyone else noticed that NSCalendarDate's years:months:days:hours:minutes:seconds:sinceDate: is very slow?

I tried using it to calculate a relative date and/or time, for display in a table view (e.g. "3 hours 7 minutes 12 seconds", updating every second). But it caused the app response time to fall unacceptably, which was traced to that method. It took an average of almost a second each time on an 800MHz G4 iMac... which is unacceptable when it is being called once per second.


I have not seen this performance problem and I use NSCalendarDate extensively. Have you tried using hard-coded parameters, as in years:0 months:0 days:1 to see if the particular parameters you're using are expensive? Alternatively, have you tried putting an NSLog in whichever function is creating the date to see if you're calling it more often than expected? Those are just a couple suggestions for tracking down the performance hit because I it's likely not an issue with NSCalendarDate.

Regards,
Itrat.

............................................................
Modeless Software, Inc.
London, Ontario (Canada)
Tel: +1 519 473 2037
Web: www.liquidledger.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >years:months:days:hours:minutes:seconds:sinceDate: really slow! (From: David Sinclair <email@hidden>)

  • Prev by Date: Re: Strange behavior of "NSUserDefaults"
  • Next by Date: Re: NSDateFormatter : SOLVED
  • Previous by thread: years:months:days:hours:minutes:seconds:sinceDate: really slow!
  • Next by thread: NEWBIE: double backslash in NSStrings
  • Index(es):
    • Date
    • Thread