Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Keith Blount
, Keith --- On Mon, 1/25/10, Mike Abdullah wrote: > From: Mike Abdullah > Subject: Re: Fastest way to convert an NSDate into an NSString > To: "Keith Blount" > Cc: cocoa-dev@lists.apple.com > Date: Monday, January 25, 2010, 8:33 PM > This approach is probably cre

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread jonat...@mugginsoft.com
On 25 Jan 2010, at 20:33, Mike Abdullah wrote: > This approach is probably creating a new NSDateFormatter for each date > processed. What if you create your own formatter and use that for all dates? > I think Mike is right here. It was the NSDateFormatter that was the time sink not NSDate itsel

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Jens Alfke
On Jan 25, 2010, at 12:23 PM, Keith Blount wrote: But either way suffers the same performance hit. So, my question is, does anyone know of a much faster and more efficient way of converting NSDates to NSStrings? (A possible solution would be to change my data model to store these dates as

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Nick Zitzmann
On Jan 25, 2010, at 1:23 PM, Keith Blount wrote: > But either way suffers the same performance hit. So, my question is, does > anyone know of a much faster and more efficient way of converting NSDates to > NSStrings? You didn't say you needed the date to be formatted, so have you tried somethi

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Mike Abdullah
This approach is probably creating a new NSDateFormatter for each date processed. What if you create your own formatter and use that for all dates? On 25 Jan 2010, at 20:23, Keith Blount wrote: > Hello, > > I am in the process of converting the data format for my application from one > that ju

Re: Fastest way to convert an NSDate into an NSString

2010-01-25 Thread jonat...@mugginsoft.com
On 25 Jan 2010, at 20:23, Keith Blount wrote: > Hello, > > I am in the process of converting the data format for my application from one > that just uses the NSKeyedArchiver methods to archive my objects to a file on > disk to using the NSXML classes to generate a custom XML file (I need to do

Fastest way to convert an NSDate into an NSString

2010-01-25 Thread Keith Blount
Hello, I am in the process of converting the data format for my application from one that just uses the NSKeyedArchiver methods to archive my objects to a file on disk to using the NSXML classes to generate a custom XML file (I need to do this for compatibility purposes). My main data object is