• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Newbie question: DOM & memory requirements

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm a bit of a newbie to XML, and I was hoping someone could answer a question for me please. Is anyone aware of how much memory would be required to load say a 1MB XML file into the DOM? I'm sure it probably varies between parsers, but I would very much like to find out the memory overhead incurred in doing this. If anyone has any ideas I'd be very grateful!! Apologies if this has been asked before..
many thanks for all your help guys
cheers
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DOM parsing typically uses more memory than SAX parsing. This is because the parser creates a document representation in memory with all the nodes and cross references.
I do not have any parser specific statistics, but you should always consider DOM as an expensive parsing mechanism. The bigger the document size is, the more will be memory consumption and time required to parse.
Hope that helps.
 
reply
    Bookmark Topic Watch Topic
  • New Topic