Hmm, a data structure which must reallocate every x times does not have an
O(1) insertion time, but rather O(n).
Shouldn't this be set up to allocate 2x more memory when the boundary is
met?

-----Original Message-----
From: Smita [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 19, 2005 12:19 AM
To: [email protected]
Subject: Re: Issue with DOMDocument::getElementsByTagName method


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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
___________________________________________________________________
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure.  If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof.  Thank you.


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

Reply via email to