Re: Efficiently iterating files on the iPhone
Re: Efficiently iterating files on the iPhone
- Subject: Re: Efficiently iterating files on the iPhone
- From: Jens Alfke <email@hidden>
- Date: Wed, 14 Apr 2010 13:06:07 -0700
On Apr 14, 2010, at 12:39 PM, Dave DeLong wrote:
If I have to, I can use the NSFileManager APIs, but then I'd have to
grab the entire directory listing at once (instead of getting it in
chunks), and then iteratively ask for each item's attributes. It
seems rather inefficient, and I want to make this as efficient as
possible.
Have you actually written the code and measured how long it takes? Or
are you guessing?
How many directories and files do you expect this code to iterate over?
Also keep in mind that the iPhone uses an SSD, with zero seek time.
Keep in mind the programming principle:
"Do the simplest thing that could possibly work"
(and then measure and optimize and iterate.)
—Jens_______________________________________________
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