Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6845 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88490 invoked by uid 1010); 8 Jan 2004 08:11:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 88372 invoked from network); 8 Jan 2004 08:11:22 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 8 Jan 2004 08:11:22 -0000 Received: (qmail 31096 invoked from network); 8 Jan 2004 08:11:15 -0000 Received: from guardian.zend.office (HELO andi-laptop.zend.com) (10.1.1.4) by int.zend.com with SMTP; 8 Jan 2004 08:11:15 -0000 Message-ID: <5.1.0.14.2.20040108100152.02029de8@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 08 Jan 2004 10:10:59 +0200 To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Ability to lower PHP memory usage From: andi@zend.com (Andi Gutmans) Hey, I just compiled PHP using --disable-all and realized that there's a shit load of relatively useless stuff still being compiled into it. The first thing I realized is that regex is still being compiled in by default. Are any parts of PHP's core relying on regex, thus, requiring it to be in the minimal build? I think most people today are using pcre and it would be great if we could support a version without regex. The second problem is in ext/standard with a zillion of functions. A lot of them are in my opinion not used by the majority of users and it would be great to be able not to compile them into PHP. Things that come to my mind: a) crc32 b) cyr_convert c) image d) lcg e) metaphone f) soundex g) levenshtein h) sha1 i) uuencode and probably some other stuff, In order for PHP users to get the most out of their servers, being able to reduce memory footprint as much as possible is quite important so that they can increase MaxClients to as much as possible. As we're in a code freeze for RC1 it's a bit late to do something about it, but I think it'd be nice to brainstorm about this to see how we can solve this, maybe for 5.1? If regex isn't required by the core that's one of the first things I'd like to see disabled when building with --disable-all. I think ext/standard should maybe be split up into two, the first ext/core and the second ext/standard where ext/core is the stuff which *really* needs to be part of PHP such as strlen(), file functions and pretty much stuff I didn't list in my list :) Any thoughts? Ideas? Flames? :) Andi