You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Paulo Pizarro <pa...@digitro.com.br> on 2002/01/14 17:37:44 UTC

Memory used when parsing an xml file...

I am using Xerces 1.6.0 and find that quite a bit of memory is used and 
retained when parsing an xml file.

The file I am using is about 500 Kbytes and running a short program that only 
parses the file the memory usage is about 12 MBytes.  This is in release mode.

Does this seem correct?  Should I be expected much greater memory efficiency? 
Does it make a difference with the depth of the elements in the tree?

The simple program I wrote to test this is as follows.

		parser = new IDOMParser;
		parser->setIncludeIgnorableWhitespace(false);
		parser->setCreateEntityReferenceNodes(false);
		//parser->setValidationConstrainFatal(true);
		parser->setDoSchema(false);
		parser->setValidationScheme(IDOMParser::Val_Auto);
		parser->setValidationSchemaFullChecking(false);
		parser->setDoNamespaces(false);

		const char* xmlFile = "prefixos.xml";

		parser->parse(xmlFile);

Thanks in advance.

Best regards,

Paulo Pizarro