-- Lossoth <[email protected]> wrote
(on Monday, 29 December 2008, 03:48 AM -0800):
>
> I'do more test.
> I note that is the query() function to a Zend_Dom_Query object that increase
> the memory.
> I unset() both Zend_Dom_Query and Zend_Dom_QueryResult objects and the
> problem persist!
> If I comment the query functions the memory usage does not increase!!
Well, that makes sense -- you're not actually performing any operations
on the DOM at that point.
> I've no idea
>
>
> $dom = new Zend_Dom_Query($response);
> $domDiv = $dom->query('div[class="someClass"]');
Rewrite this to:
$domDiv = $dom->query('div.someClass');
as that's the correct CSS selector equivalent of what you're attempting
to do. That may make a difference in resource usage.
> //this code goes in out of memory
>
> $dom = new Zend_Dom_Query($response);
> //$domDiv = $dom->query('div[class="someClass"]');
> //this code DO NOT goes in out of memory
--
Matthew Weier O'Phinney
Software Architect | [email protected]
Zend Framework | http://framework.zend.com/