Re: NSXMLParser memory consumption
Re: NSXMLParser memory consumption
- Subject: Re: NSXMLParser memory consumption
- From: Marcel Weiher <email@hidden>
- Date: Sun, 5 Apr 2009 10:27:16 -0700
On Apr 5, 2009, at 9:35 , George King wrote:
Yes, probably. Have you tried initializing it with a memory-mapped
NSData instead of an NSURL?
Thank you for the suggestion; I was unaware of
initWithContentsOfMappedFile:. This worked to a certain extent, in
that it kept memory consumption to within the bounds of available
physical memory, but it still consumed all the memory available.
This caused a good deal of thrashing when I tried running the test
and working at the same time.
This may be one of a number of things. You might want to check wether
an madvise() call on the mapped memory range with the
"MADV_SEQUENTIAL" flag helps. This tells the system that it can do a
"free-behind" of memory you've touched.
Thanks for the link - I will investigate. Yesterday I got into
libxml2, and the xmlReader API provides functionality equivalent to
NSXMLParser without the memory consumption.
If you're seeing a difference with libxml2, then Objective-XML should
also help, to a similar or somewhat better extent.
Cheers,
Marcel
_______________________________________________
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