Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Apple question - FSRead



It is okay to call FSRead a byte at a time.

As for being buffered, I don't know what happens internally, but I've always treated FSRead as unbuffered. I expect that the hardware reads a sector at a time so no matter what the buffering scheme a 1-2 KB file is likely loaded with the first read.

Bottom line: don't worry about the buffering. I doubt that you're going to get much noticeable performance bonus by tweaking the reads of small configuration files.

There's a list for carbon development:
http://www.lists.apple.com/mailman/listinfo/carbon-development


On Tuesday, Sep 2, 2003, at 09:26 America/Edmonton, Barkley, Keith wrote:

This does not pertain to PB directly, but...

I am writing a Carbon application that reads some relatively small (1-2K)
configuration files.

Is it OK to call FSRead to get a byte at a time?. I guess the question
really is: Is FSRead internally buffered? Or am I double-buffering by
creating my own buffering loop to keep from calling FSRead() several
thousand times.

Thanks

KRB
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Newbie Apple question - FSRead (From: "Barkley, Keith " <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.