• 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: NSFileHandle or a better way?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileHandle or a better way?


  • Subject: Re: NSFileHandle or a better way?
  • From: Jaime Magiera <email@hidden>
  • Date: Fri, 30 Jan 2009 14:14:03 -0500

On Jan 30, 2009, at 11:08 AM, Keary Suska wrote:

I suspect your bottleneck is the filesystem. To know for sure you could try the raw C calls and see if it speeds up. In any case, instead of doing a grow/shrink on the file, write to a temp file instead then swap them. This way you could also do optimized batch- writes. This alone could speed the process up immensely. Notwithstanding, how do you recover if your app crashes after you truncate the file?


Hi Keary,

Thanks for the response. The project did originally start out writing to temp files for these processes. However, I got a complaint from a customer about the disk footprint of temp files. So, I tried going the other route. (I explained the value of tmp files, but they felt the tradeoff wasn't worth it). Now, it seems the original path was the best regardless. I shall return to that method.

thanks for the advice,

Jaime Magiera

Sensory Research
http://www.sensoryresearch.net

_______________________________________________

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: 
 >NSFileHandle or a better way? (From: Jaime Magiera <email@hidden>)
 >Re: NSFileHandle or a better way? (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: NSMouseEntered during drag op, losing window reference
  • Next by Date: CoreData relationship/KVC question
  • Previous by thread: Re: NSFileHandle or a better way?
  • Next by thread: Re: NSFileHandle or a better way?
  • Index(es):
    • Date
    • Thread