Re: memory usage issues in PEAR 1.4.0
| From: | Alan Knowles | Date: | Fri, 04 Mar 2005 07:04:45 +0000 |
| Subject: | Re: memory usage issues in PEAR 1.4.0 | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-36517@lists.php.net to get a copy of this message | ||
alan@debian:~$ php4 -r 'require_once "PEAR/Remote.php";
var_dump(memory_get_usage());'
int(438088)
Thats with php4 and 5 with pear 1.3.2
a 20x increase in memory usage from a that is very odd..
Regards
Alan
On Thu, 2005-03-03 at 19:34 -0500, Greg Beaver wrote:
> bertrand Gugger wrote:
>
> >>> Why not have the pear detach a second process just building the
> >>> "database" and then answering its parent (the pear installer) on
> >>> inquiries thru a pipe ?
> >>> So you divide and get speed with less individual resource usage.
> >>> I know it's some unix view, but I'm certain MS furnish similar ways.
> >>>
> >>> OK again, just future sight here :)
> >>
>
> I've done some tracing, and the problem is not actually in the code - I
> reached the memory limit of 8 MB before all of the code is even
> completely loaded into memory when using Zend (which adds some junk for
> debugging). If you want to prove it, try this script:
>
> <?php
> require_once 'PEAR/Remote.php';
> var_dump(memory_get_usage());
> ?>
>
> This will only work in php 5, btw. The output I get is:
>
> bash-2.05b$ /usr/local/Zend/ZendStudioClient-4.0.0/bin/php5/php test.php
> Content-type: text/html
> X-Powered-By: PHP/5.0.3
>
> int(7436608)
>
> 7.4 MB to do this. There is no way I can improve the memory situation
> without removing a ton of features.
>
> Greg
>