• 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: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?


  • Subject: Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 1 Aug 2008 17:44:14 -0600


On Aug 1, 2008, at 4:33 PM, JongAm Park wrote:

Hello..

Ahnyong haseo,

I have some codes which were written in Carbon and we want to make its performance faster.
I found out that most of the time is spent by a series of FSWriteFork() function. So, I would like to use any method which is faster than that.
fwrite is one option but I also looked up a Cocoa method, writeData message of the NSFileHandle.


Does anyone know if the writeData's performance compared to the FSWriteFork()?


You could try it, but I don't see how it would make a difference, since these close-to-direct I/O functions tend to be limited to the speed of the output device rather than the CPU, unless they take advantage of a certain feature of the file system in use (see FSGetCatalogInfo()). Instead, you should probably re-evaluate how much & how often the software is writing to the disk, or switch to asynchronous I/O.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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: 
 >[Q] is NSFileHandle's writeData method faster than the FSWriteFork? (From: JongAm Park <email@hidden>)

  • Prev by Date: Re: Putting a spinning progress indicator in a outline
  • Next by Date: Re: NSDistributedNotifications and scripting languages
  • Previous by thread: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?
  • Next by thread: Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?
  • Index(es):
    • Date
    • Thread