Req #7563 [Com]: Improve memory usage

From: Date: Wed, 09 Jun 2010 15:27:25 +0000
Subject: Req #7563 [Com]: Improve memory usage
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3908@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=7563&edit=1 ID: 7563 Comment by: wcomnisky Reported By: w dot comnisky at gmail dot com Summary: Improve memory usage Status: Open Type: Feature/Change Request Package: PhpDocumentor Operating System: FreeBSD 4.11-STABLE Package Version: 1.3.0RC6 PHP Version: 4.3.11 New Comment: I have the same problem (allowed memory size exhausted) while trying to generate the documentation of my models, generated by Propel (113 model classes, with their peers, map builders and base classes - 565 files). Ubuntu 9.10 PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) Zend Engine v2.2.0 with Xdebug v2.0.4 phpDocumentor version 1.4.3 Maximum memory usage set at 512M by phpDocumentor.ini using tokenizer Parser [exec] Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 35 bytes) in /usr/share/php/PhpDocumentor/phpDocumentor/phpDocumentorTWordParser.inc on line 303 [exec] [exec] Call Stack: [exec] 0.0006 57828 1. {main}() /usr/bin/phpdoc:0 [exec] 0.0011 66360 2. require('/usr/share/php/PhpDocumentor/phpDocumentor/phpdoc.inc') /usr/bin/phpdoc:40 [exec] 0.1359 9419524 3. phpDocumentor_setup->createDocs() /usr/share/php/PhpDocumentor/phpDocumentor/phpdoc.inc:65 [exec] 107.1463 533144076 4. phpDocumentorTParser->parse() /usr/share/php/PhpDocumentor/phpDocumentor/Setup.inc.php:752 [exec] 107.1516 530961380 5. phpDocumentorTParser->configWordParser() /usr/share/php/PhpDocumentor/phpDocumentor/phpDocumentorTParser.inc:235 [exec] 107.1517 530961444 6. phpDocumentorTWordParser->setup() /usr/share/php/PhpDocumentor/phpDocumentor/phpDocumentorTParser.inc:2939 [exec] 107.1639 534709464 7. phpDocumentorTWordParser->addFileSource() /usr/share/php/PhpDocumentor/phpDocumentor/phpDocumentorTWordParser.inc:124 [exec] 107.2731 536752240 8. phpDocumentorTWordParser->addSource() /usr/share/php/PhpDocumentor/phpDocumentor/phpDocumentorTWordParser.inc:282 [exec] 107.2731 536752832 9. str_replace() /usr/share/php/PhpDocumentor/phpDocumentor/phpDocumentorTWordParser.inc:303 [exec] [exec] Result: 255 (running with Ant) Previous Comments: ------------------------------------------------------------------------ [2010-04-08 18:35:20] protatoe Sorry to add to an old thread, but I was quiet surprised to see this still an issue 4 years after it was reported. Even at a 1GB of ram, it's still failing to parse out the documentation. This only started happening after recompiling with tokenizer support, because it was failing for different reasons with out. ------------------------------------------------------------------------ [2007-01-10 15:59:48] ashnazg at php dot net SF patch #1588942 is now committed to CVS, so memory_limit will now be configurable in the INI file. ------------------------------------------------------------------------ [2006-12-18 15:29:04] cellog the patch simply allows setting memory_limit, which does not in fact improve memory usage, so no, this is a separate and massive undertaking that is planned for 2.0 ------------------------------------------------------------------------ [2006-12-18 12:44:16] ashnazg at php dot net Greg, should I consider committing patch #1588942 as a "fix" for this particular bug, or would that patch count as an enhancement ("feature") and require this bug to wait for a feature release before it gets committed? ------------------------------------------------------------------------ [2006-12-05 13:00:30] ashnazg at users dot sourceforge dot net I submitted a Sourceforge patch last month that allows you to configure a max memory value in the phpDocumentor.ini file. The patch is at https://sourceforge.net/tracker/index.php?func=detail&aid=1588942&group_id=11194&atid=311194 Here's how it works: - if you put a memory_limit value in phpDocumentor.ini, it is used... period... regardless of how big or how small in relation to php.ini or 256; - otherwise, the LARGER of php.ini's value OR the 256MB value is used. Oliver: If your php.ini setting is already >256, then the existing code should not be causing phpDocumentor to drop to the lower 256MB ceiling. However, using my patch will allow you to set the value to whatever you want it to be, using phpDocumentor.ini to do it. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://pear.php.net/bugs/bug.php?id=7563 -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=7563&edit=1

« previous php.pear.bugs (#3908) next »