raghu,

     Sorry for the mistake made, the resetDocumentPool() shall be invoked,
which
in turns, invoke the resetPool() to release the memory allocated for the
documents parsed.

Rgds,
PeiYong

----- Original Message -----
From: "Raghu Nandan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 2:38 PM
Subject: Re: Process Growth


>
>
>
>
> PeiYong:
>
> Thanks for your response.
>
> When I look for the documentation for this method in the doxygen pages,
> I do not see any description. What does this method do?
>
> regards,
> raghu
>
> "PeiYong PY Zhang" <[EMAIL PROTECTED]> on 03/03/2003 02:25:12 PM
>
> Please respond to [EMAIL PROTECTED]
>
> To:    <[EMAIL PROTECTED]>
> cc:
> Subject:    Re: Process Growth
>
>
>
> raghu,
>
>      It is the resetPool() u need to release the memory allocated for
> the document parsed.
>
>    try {
>      parser->resetPool();
>      parser->parse(xmlFile);
>   }
>
> Rgds,
> PeiYong
>
> ----- Original Message -----
> From: "Raghu Nandan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 03, 2003 12:32 PM
> Subject: Process Growth
>
>
> >
> >
> >
> >
> >
> > Folks:
> >
> > In order to test performance when handling xml scripts,
> > I modified the sample program given in the programming
> > guidelines so that it looped over calls to the parser.
> > To make matters simple, I just used the same xml script
> > for each iteration.
> >
> > I notice that there is a significant growth in process size as
> > reported by the "ps au" command. I have tried this on
> > aix 5.2 using visual age 6.0 compiler with Xerces-c++ version 2.1
> > as well as on SuSE linux 8.0 professional with Xerces c++ version
> > 2.2.
> >
> > Here is the sample code:
> >
> > #include <xercesc/parsers/XercesDOMParser.hpp>
> > #include <xercesc/dom/DOM.hpp>
> > #include <xercesc/sax/HandlerBase.hpp>
> > #include <xercesc/util/XMLString.hpp>
> > #include <xercesc/util/PlatformUtils.hpp>
> > #include <iostream>
> >
> > using namespace std;
> >
> > int main (int argc, char** args)
> > {
> >   try {
> >     XMLPlatformUtils::Initialize();
> >   }
> >   catch (const XMLException& toCatch) {
> >     char* message = XMLString::transcode(toCatch.getMessage());
> >     cout << "Error during initialization! :\n"
> >          << message << "\n";
> >     delete [] message;
> >     return 1;
> >   }
> >
> >   XercesDOMParser* parser = new XercesDOMParser();
> >   parser->setValidationScheme(XercesDOMParser::Val_Always);    //
> optional.
> >   parser->setDoNamespaces(true);    // optional
> >
> >   ErrorHandler* errHandler = (ErrorHandler*) new HandlerBase();
> >   parser->setErrorHandler(errHandler);
> >
> >   char* xmlFile = "sample2.xml";
> >
> >   try {
> >     cout << "priming" << endl;
> >     parser->reset();
> >     parser->resetDocumentPool(); //Is this required
> >     parser->parse(xmlFile);
> >   }
> >   catch (const XMLException& toCatch) {
> >     char* message = XMLString::transcode(toCatch.getMessage());
> >     cout << "Exception message is: \n"
> >          << message << "\n";
> >     delete [] message;
> >     return -1;
> >   }
> >   catch (const DOMException& toCatch) {
> >     char* message = XMLString::transcode(toCatch.msg);
> >     cout << "Exception message is: \n"
> >          << message << "\n";
> >     delete [] message;
> >     return -1;
> >   }
> >   catch (...) {
> >     cout << "Unexpected Exception \n" ;
> >     return -1;
> >   }
> >
> >   for (;;) {
> >     cout << "before parse" << endl;
> >     parser->reset();
> >     parser->parse(xmlFile);
> >     cout << "after parse" << endl;
> >   }
> >
> >   delete parser;
> >   delete errHandler;
> >   return 0;
> >
> > }
> >
> > Has anyone else experienced similar problems?
> > Any help / pointers regarding which calls need to be made in order to
> > avoid process growth is welcome.
> >
> > Thanks,
> > raghu
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to