• 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: NSXMLParser memory consumption
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSXMLParser memory consumption (From: George King <email@hidden>)
 >Re: NSXMLParser memory consumption (From: Marcel Weiher <email@hidden>)
 >Re: NSXMLParser memory consumption (From: George King <email@hidden>)

  • Prev by Date: Re: Need localization-proof method of transporting dates.
  • Next by Date: Re: creating related objects
  • Previous by thread: Re: NSXMLParser memory consumption
  • Next by thread: Using bindings to set NSImageView from filename
  • Index(es):
    • Date
    • Thread