Re: Performance issue : NSDictionary against NSXMLNode and NSXMLParser
Re: Performance issue : NSDictionary against NSXMLNode and NSXMLParser
- Subject: Re: Performance issue : NSDictionary against NSXMLNode and NSXMLParser
- From: Yann Bizeul <email@hidden>
- Date: Wed, 27 Jul 2005 10:19:52 +0200
The solution I finaly choosed is to load my file in a NSString, then
split it according to some identified item separator (like "</
closingTag>") then parse manually each entry "on-demand".
This is really fast for the initial split.
Yann Bizeul • yann at tynsoe.org
Cocoa Developer
Tynsoe Projects
BuddyPop • GeekTool • SSH Tunnel Manager • ...
http://projects.tynsoe.org/
Le 17 juin 05 à 10:34, Yann Bizeul a écrit :
Hi list.
I'm writing an application that used to take its data from a
file using plist syntax, so that it is loadable with
dictionaryWithContentsOfFile:.
This was very efficient, quick to load and parse.
Then we decided to change the file format, and use a custom XML
DTD, that's where the problems began.
First, I decided to use NSXMLNode with its powerfull XQuery
implementation, things were really fine, and I was really impressed
by the power of XQuery.... with 10 entries.
But when testing with a big file consisting of more that 5000
entries, it took more that 10s to load, and filtering was a pain.
So according to the doc, I saw that NSXMLParser should be more
efficient, which is true, file takes only 6s to parse and filtering
should be quicker too
But I would like to know how I could get the same performance
of NSDictionnary loading its content from a file. If anyone has a
good tip to quickly load, parse and filter big XML files please
advice :-)
Thanks
Yann Bizeul • yann at tynsoe.org
Cocoa Developer
Tynsoe Projects
BuddyPop • GeekTool • SSH Tunnel Manager • ...
http://projects.tynsoe.org/
_______________________________________________
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
_______________________________________________
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