You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/10/19 19:03:51 UTC
[jira] Closed: (XERCESC-371) The DOMParse will be very slow as we use it repeatly
Message:
The following issue has been closed.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESC-371
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESC-371
Summary: The DOMParse will be very slow as we use it repeatly
Type: Bug
Status: Closed
Resolution: WON'T FIX
Project: Xerces-C++
Components:
DOM
Versions:
1.6.0
Assignee:
Reporter: pochao
Created: Mon, 18 Mar 2002 7:58 AM
Updated: Tue, 19 Oct 2004 10:02 AM
Environment: Operating System: Solaris
Platform: Sun
Description:
The above is the function spec
(1)\samples\DOMPrint\DOMPrint.cpp
main()
{
/****************PART A OF THE SAMPLE******************/
try
{
XMLPlatformUtils::Initialize();
}
DOMParser *parser = new DOMParser;
parser->setValidationScheme(gValScheme);
parser->setDoNamespaces(gDoNamespaces);
parser->setDoSchema(gDoSchema);
parser->setValidationSchemaFullChecking(gSchemaFullChecking);
DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter();
parser->setErrorHandler(errReporter);
parser->setCreateEntityReferenceNodes(gDoCreate);
parser->setToCreateXMLDeclTypeNode(true);
parser->parse(gXmlFile);
/******************PART A OF TJE SAMPLE******************/
.......
/****************PART B OF THE SAMPLE******************/
delete parser;
// And call the termination method
XMLPlatformUtils::Terminate();
/****************PART B OF THE SAMPLE******************/
}
(2)Now I use my class examples
class DOMXmlFile{
private:
...........
DOMParser* parse;
.............
public:
..............
DOMXmlFile();
~DOMXmlFile();
}
I put the part A of THE SAMPLE in DOMXmlFile();
put the part B of THE SAMPLE in ~DOMXmlFile();
Question(1)in win32 the class works
in solaris 2.7 as the ~DOMXmlFile() of the code executes
it will coredump in the ~DOMXmlFile() last line
Question(2)I use xml size 0.6mb to test
the perforance of parser->parse(gXmlFile);
If I just use the object DOMXmlFile one time in a process
parser->parse(gXmlFile) it costs about 0.25sec
But if I use the object DOMXmlFile twice or n times in a process
it means maybe I open two different xml file or open the same xml
file
at different time but in a process,
parser->parse(gXmlFile) it costs about 0.25sec
parser->parse(gXmlFile) it costs about 0.35sec ----> slow second time
parser->parse(gXmlFile) it costs about 0.45sec ----> slow third time
Could you help me where my problem is and how to slove the
questions
Thanks very much
Best Regards
Pochao 2002.3.18
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org