Re: DOMTreeWalker Memory Management

2004-10-22 Thread Gareth Reakes
Hi, I've tried option 1 and it's at least 3-4 times slower. Would you give me details and pointers on how to implement option 2? Not sure what you meant by implement the release, since release() for the DOMTreeWalker is already implemented. Take a look in dom/impl/DOMTreeWalkerImpl.cpp . You will

Re: DOMTreeWalker Memory Management

2004-10-21 Thread Hua-Ying Ling
Gareth, On Wed, 20 Oct 2004 10:11:48 +0100, Gareth Reakes <[EMAIL PROTECTED]> wrote: > Three options spring to mind: > > i) Clone the document into another document and release the first > (although memory consumption is still an issue with 2 docs in memory) > ii) Implement the release > iii) Imp

Re: DOMTreeWalker Memory Management

2004-10-20 Thread Gareth Reakes
Hey, Hua-Ying Ling wrote: On Tue, 19 Oct 2004 10:15:06 +0100, Gareth Reakes <[EMAIL PROTECTED]> wrote: Hi, this is expected behavior. The rational is that recycling the pointer/memory is expensive in comparison to the likelihood of it being required. That explains it. I've got a program

Re: DOMTreeWalker Memory Management

2004-10-19 Thread Hua-Ying Ling
On Tue, 19 Oct 2004 10:15:06 +0100, Gareth Reakes <[EMAIL PROTECTED]> wrote: > Hi, > > this is expected behavior. The rational is that recycling the > pointer/memory is expensive in comparison to the likelihood of it being > required. That explains it. I've got a program where I'm accessing

Re: DOMTreeWalker Memory Management

2004-10-19 Thread Gareth Reakes
Hi, this is expected behavior. The rational is that recycling the pointer/memory is expensive in comparison to the likelihood of it being required. Gareth Hua-Ying Ling wrote: Hi, I find that if I run the code below in a tight loop, the memory footprint will keep growing unless I call docume