• 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
Speeding up creation of NSDictionary from XML? (iTunes related)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Speeding up creation of NSDictionary from XML? (iTunes related)


  • Subject: Speeding up creation of NSDictionary from XML? (iTunes related)
  • From: Jonathan del Strother <email@hidden>
  • Date: Thu, 10 Nov 2005 18:08:05 +0000

My app reads the iTunes XML when it launches, and creates an NSDictionary from it. This takes around 1.6 seconds for my iTunes library.

I'd like to speed up the app launch time, so have been trying to figure out ways of reducing this. I figured that if NSDictionary didn't need to do the text parsing and validation procedures on the XML, it would be far faster. So my original plan was to load the XML as normal, then save the new NSDictionary in binary form. On next launch, if the XML file date hasn't changed, we can just load the binary form off disk, with no text parsing needed.
I originally tried this with NSKeyedUnarchiver, without much luck - it was about 0.6 seconds *slower* than reading the xml.
NSUnarchiver did slightly better - 0.15 seconds faster than the xml.


Even so, I'd like it faster if at all possible. (The fact that iTunes rather frequently bumps the file date on the XML doesn't help matters, either)

Other than begging the CF team to optimise CFPropertyListCreateFromXML some more, can anyone think of any other techniques I might try on this?

Cheers
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Speeding up creation of NSDictionary from XML? (iTunes related)
      • From: John Stiles <email@hidden>
  • Prev by Date: howto mix objc/c++ in a nice way?
  • Next by Date: Re: Speeding up creation of NSDictionary from XML? (iTunes related)
  • Previous by thread: Re: howto mix objc/c++ in a nice way?
  • Next by thread: Re: Speeding up creation of NSDictionary from XML? (iTunes related)
  • Index(es):
    • Date
    • Thread