Re: memory usage issues in PEAR 1.4.0
| From: | Alan Knowles | Date: | Fri, 04 Mar 2005 18:02:38 +0000 |
| Subject: | Re: memory usage issues in PEAR 1.4.0 | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-36539@lists.php.net to get a copy of this message | ||
Yes, I think this does need some thought...... = alot of the files below are not needed for pear upgrade pear..
BTW pear upgrade pear wiped out my /usr/bin/pear
- it removed the old one, but didnt install a new one.. (it's was a 1.3.3 AFAIR)
php -r 'require_once "PEAR/Remote.php";print_r(get_included_files());'
Array
(
[0] => /usr/share/pear/lib/PEAR/Remote.php
[1] => /usr/share/pear/lib/PEAR.php
[2] => /usr/share/pear/lib/PEAR/Config.php
[3] => /usr/share/pear/lib/System.php
[4] => /usr/share/pear/lib/Console/Getopt.php
)
[0] => /usr/lib/php/PEAR/Remote.php
[1] => /usr/lib/php/PEAR.php
[2] => /usr/lib/php/PEAR/Config.php
[3] => /usr/lib/php/PEAR/Registry.php
[4] => /usr/lib/php/System.php
[5] => /usr/lib/php/Console/Getopt.php
[6] => /usr/lib/php/PEAR/Installer/Role.php
[7] => /usr/lib/php/PEAR/Installer/Role/Common.php
[8] => /usr/lib/php/PEAR/DependencyDB.php
[9] => /usr/lib/php/PEAR/ChannelFile.php
[10] => /usr/lib/php/PEAR/ErrorStack.php
[11] => /usr/lib/php/PEAR/Validate.php
[12] => /usr/lib/php/PEAR/Common.php
[13] => /usr/lib/php/PEAR/Frontend.php
[14] => /usr/lib/php/Archive/Tar.php
[15] => /usr/lib/php/PEAR/PackageFile.php
[16] => /usr/lib/php/PEAR/Downloader.php
[17] => /usr/lib/php/PEAR/Dependency2.php
[18] => /usr/lib/php/OS/Guess.php
[19] => /usr/lib/php/PEAR/Downloader/Package.php
[20] => /usr/lib/php/PEAR/Validator/PECL.php
[21] => /usr/lib/php/PEAR/XMLParser.php
[22] => /usr/lib/php/PEAR/PackageFile/v1.php
[23] => /usr/lib/php/PEAR/PackageFile/Generator/v1.php
[24] => /usr/lib/php/PEAR/PackageFile/v2.php
[25] => /usr/lib/php/PEAR/PackageFile/Generator/v2.php
[26] => /usr/lib/php/PEAR/PackageFile/v2/Validator.php
[27] => /usr/lib/php/PEAR/REST.php
Greg Beaver wrote:
Alan Knowles wrote: This will mean that when upgrading PEAR, fatal errors will alwaysoccur if any major changes are made in lazy-loaded files, because the newer file is included. >For instance, downgrading to 1.3.5 from 1.4.0 destroys the installation without the non-lazy loading. Hence, if ($package == 'PEAR') lazy load all files before upgrading? - it's looks alot like an edge case scenario that's affecting more general usage, and maybe a contributor to pearweb load issues?, It seems like it might be worth investigating to try and solve this?How would you determine whether it is necessary? In PEAR_Installer::install() is the only location you can be sure. So would I add a whole bunch of include_once() statements like so: if ($package == 'PEAR' && $channel == 'pear.php.net') { include_once ..... } ? pearweb doesn't require any PEAR installer classes except to handle release uploads, I doubt this is a contributor. Greg