• 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: NSKeyedArchiver finishEncoding takes forever
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSKeyedArchiver finishEncoding takes forever


  • Subject: Re: NSKeyedArchiver finishEncoding takes forever
  • From: "Michael Ash" <email@hidden>
  • Date: Thu, 19 Jun 2008 00:43:18 -0400

On Wed, Jun 18, 2008 at 11:48 PM, Markus Spoettl
<email@hidden> wrote:
> On Jun 18, 2008, at 2:41 PM, Michael Ash wrote:
>>
>> Although it partially defeats the purpose of using NSCoder, you'll
>> avoid this whole path if you stuff all four doubles into a single
>> NSData. Don't forget to use the byte-swapping functions to ensure that
>> they all have a consistent representation across architectures.
>
> Well, what can I say, you and Quincey Morris are absolutely right. This is
> the way to go.
>
> The same data set takes just 4 seconds to store with a file size of 17.2MB.
>
> Thanks for all the help guys! For the record I'm posting the code below.

I'm glad it all worked out for you.

Just to address one last point, there should be no problems with
floating point formats. As a practical matter, both PPC and x86 use
the same IEEE754 floating point format, so the only problem is
endianness. Any realistic future architecture is also likely to use
this standard format. In a theoretical sense you should be protected
regardless, because the swap functions you're using are explicitly
made for floating point, so if there were any format differences then
they would be expected to take care of them for you.

Mike
_______________________________________________

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

References: 
 >NSKeyedArchiver finishEncoding takes forever (From: Markus Spoettl <email@hidden>)
 >Re: NSKeyedArchiver finishEncoding takes forever (From: "Michael Ash" <email@hidden>)
 >Re: NSKeyedArchiver finishEncoding takes forever (From: Markus Spoettl <email@hidden>)
 >Re: NSKeyedArchiver finishEncoding takes forever (From: Quincey Morris <email@hidden>)
 >Re: NSKeyedArchiver finishEncoding takes forever (From: Markus Spoettl <email@hidden>)
 >Re: NSKeyedArchiver finishEncoding takes forever (From: "Michael Ash" <email@hidden>)
 >Re: NSKeyedArchiver finishEncoding takes forever (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: NSKeyedArchiver finishEncoding takes forever
  • Next by Date: CFWriteStreamWrite Blocking if we give invalid Host.
  • Previous by thread: Re: NSKeyedArchiver finishEncoding takes forever
  • Next by thread: Re: NSKeyedArchiver finishEncoding takes forever
  • Index(es):
    • Date
    • Thread