Re: NSFileHandle or a better way?
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