• 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: Efficiently iterating files on the iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Efficiently iterating files on the iPhone (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: base64Binary
  • Next by Date: Re: Efficiently iterating files on the iPhone
  • Previous by thread: Efficiently iterating files on the iPhone
  • Next by thread: Re: Efficiently iterating files on the iPhone
  • Index(es):
    • Date
    • Thread