#48643 [Opn]: Memory not freed with FilterIterator
| From: | zoe@php.net | Date: | Mon, 22 Jun 2009 12:32:03 +0000 |
| Subject: | #48643 [Opn]: Memory not freed with FilterIterator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-138635@lists.php.net to get a copy of this message | ||
ID: 48643
User updated by: zoe@php.net
Reported By: zoe@php.net
Status: Open
Bug Type: SPL related
Operating System: Linux (Ubuntu)
PHP Version: 5.2CVS-2009-06-22 (CVS)
New Comment:
By the way, I traced the memory consumption using xdebug:
xdebug.auto_trace = on;
xdebug.show_mem_delta = on;
The first few lines are here http://pastebin.ca/1469804
This makes it look more like a bug with the way the accept() method is
invoked inside PhptFilterIterator.
Previous Comments:
------------------------------------------------------------------------
[2009-06-22 11:41:59] zoe@php.net
Description:
------------
An excessive about of memory is used when a class which extends
FilterIterator is used to filter for certain file types when scanning a
source tree.
Reproduce code:
---------------
A small benchmark is provided in the tar file
here:http://filebin.ca/okgvtt/memcheck.tar
The file contains three tests which all use code in Util.php.
To run the tests edit the shell script memcheck to add the top level
directory of a PHP source tree as input to each test. Then just execute
the shell script.
The benchmarks produce a list of directories which contain .phpt files,
the memory usage when the class PhptFilterIterator is used is 20 times
higher than the other two methods.
Expected result:
----------------
Would expect the memory usage to be similar.
Actual result:
--------------
Memory usage is 20 times higher.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48643&edit=1