Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39878 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75588 invoked from network); 12 Aug 2008 15:22:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2008 15:22:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.92.171 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 66.249.92.171 ug-out-1314.google.com Received: from [66.249.92.171] ([66.249.92.171:17393] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/F1-04075-FCAA1A84 for ; Tue, 12 Aug 2008 11:22:55 -0400 Received: by ug-out-1314.google.com with SMTP id h3so389694ugf.29 for ; Tue, 12 Aug 2008 08:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=fzVwkcFpv0vou4JC1RcRtWIEzJUw12Ps8W6y9oOC9JA=; b=IHasPXIamU7pe6CbDrikeRwMOZGHt1MCaE+B5qdcci1d21k3yPf/H9oeMu+Eb69AJw ssVmWZPU6Jt34zOKqmr12QfVjiavCcQIXXEfoi91qhDOiG/tWLyKcT45d5G+NTZAnHO3 Dl764ScUhXZ1DyKp2baYH1PQtJKnJbKwkOphk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=pK6Q5/8e+6GN/fUEZIoFqAHpx9xrebhYrZ/kEnmqIzk5rpb9uVOzRBNPhH1cFENgGz cLmekkLTiYL5I3xO4FYPKAJSjJmFEZZf7VXh2J5ZfW6KMNpYKu630tV8dnzyEVwvwAEf B8lMLykBoIGZF4XZ9JIydJkVQuEt+g8ksFjII= Received: by 10.66.250.17 with SMTP id x17mr4245608ugh.0.1218554571444; Tue, 12 Aug 2008 08:22:51 -0700 (PDT) Received: by 10.67.89.3 with HTTP; Tue, 12 Aug 2008 08:22:51 -0700 (PDT) Message-ID: <9b3df6a50808120822h79895e31k9fdf695f1f1a41ce@mail.gmail.com> Date: Tue, 12 Aug 2008 18:22:51 +0300 To: "Marcus Boerger" Cc: "Etienne Kneuss" , "Stanislav Malyshev" , hannes.magnusson@gmail.com, "Lukas Kahwe Smith" , internals@lists.php.net In-Reply-To: <496879481.20080812153636@marcus-boerger.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_93119_201001.1218554571513" References: <909776579.20080803142659@marcus-boerger.de> <48A09FF4.1030101@zend.com> <7f3ed2c30808111411t51553771j389f05c3436bc625@mail.gmail.com> <48A0C415.9090104@zend.com> <48A0D579.2000000@zend.com> <48A0DBAE.2010401@zend.com> <496879481.20080812153636@marcus-boerger.de> Subject: Re: [PHP-DEV] Inconsistencies in 5.3 From: arvids.godjuks@gmail.com ("Arvids Godjuks") ------=_Part_93119_201001.1218554571513 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Not so lately I read an article about compacting library files into one big file and with opcode cache it gave 22 times faster aplication load. Article is in russian, so thouse who can read it be my guest: http://dklab.ru/chicken/nablas/49.html For others I will make a quick summary. What was taken: PHP, eAccelerator & Zend Framework. First testing case: He took full Zend Framework package and did next thing function __autoload($className) { $fname = str_replace('_', '/', $className) . '.php'; $result = require_once($fname); return $result; } // Include classes one by one class_exists('Zend_Acl_Assert_Interface'); class_exists('Zend_Acl_Exception'); class_exists('Zend_Acl_Resource_Interface'); class_exists('Zend_Acl_Resource'); // and other 790 files like this Totals: Without eAccelerator: 911 ms With eAccelerator: 435 ms Now he made one big file 4.9 MB in size and included it with one require_once call: without eAccelerator: 458 ms with eAccelerator: 42 ms So we got a realy big performance boost. Although it is a little sintetic, but in reality any big enought project will end up in loading ~40-50 files in megabytes of code. Concatenating thouse libraries in one file can give very big boost. And rememver, eAccelerator isn't the fastest opcode cacher - APC and XCache are even faster. So my point is that multiple namespaces per file should be allowed. Also it would be good idea to allow non namespaced code too, because sometimes you have a few super global tiny functions, with you need everythere and putting them into namespace is bad idea. Let the people decide if they want to make a mess or not, because they will find a way to make a total mess anyway! Let programmers like myself to feel free. P.S. I don't understand the people complaining about one more whitespace - just don't put it if you don't like it. As of me, I earn enough money to spend 200-300$ on good 19" LCD. Or you will start to get complains from people coding in command line in vim that they can't code normaly because they have only 80 symbols per line! ------=_Part_93119_201001.1218554571513--