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 Gareth Reakes <ga...@parthenoncomputing.com> on 2005/07/13 14:28:15 UTC

Re: Issue with DOMDocument::getElementsByTagName method

Hi,

Smita wrote:
> Hi,
> 
> We are using the function DOMDocument::getElementsByTagName in our
> application. We have observed that whenever this function gets called
> there is an
> increment in the Memory consumed by our application.


The method returns a DOMNodeList which has to be allocated. When the 
document is released the memory will be reclaimed. However, it is 
strange that is goes up each time the method is called. The node list is 
allocated from a section of memory that we have already reserved. When 
that memory is used up another chunk is consumed. Are you sure you see 
it go up every time, or just every x times?

Cheers,

Gareth





-- 
Gareth Reakes, Managing Director      Parthenon Computing
+44-1865-811184                  http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Issue with DOMDocument::getElementsByTagName method

Posted by Smita <sm...@persistent.co.in>.
Hi Gareth,

The memory goes up every x times. The memory rise is visible for every x
operations where x is typically greater than 1000.

Thanks,
Smita

Gareth Reakes wrote:

> Hi,
>
> Smita wrote:
> > Hi,
> >
> > We are using the function DOMDocument::getElementsByTagName in our
> > application. We have observed that whenever this function gets called
> > there is an
> > increment in the Memory consumed by our application.
>
> The method returns a DOMNodeList which has to be allocated. When the
> document is released the memory will be reclaimed. However, it is
> strange that is goes up each time the method is called. The node list is
> allocated from a section of memory that we have already reserved. When
> that memory is used up another chunk is consumed. Are you sure you see
> it go up every time, or just every x times?
>
> Cheers,
>
> Gareth
>
> --
> Gareth Reakes, Managing Director      Parthenon Computing
> +44-1865-811184                  http://www.parthcomp.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org