Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33628 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87114 invoked by uid 1010); 4 Dec 2007 06:58:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87099 invoked from network); 4 Dec 2007 06:58:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2007 06:58:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=shire@tekrat.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=shire@tekrat.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain tekrat.com from 69.63.177.213 cause and error) X-PHP-List-Original-Sender: shire@tekrat.com X-Host-Fingerprint: 69.63.177.213 sizzo.org Received: from [69.63.177.213] ([69.63.177.213:45992] helo=sizzo.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/21-52978-69AF4574 for ; Tue, 04 Dec 2007 01:58:31 -0500 Received: from [10.0.1.198] (unknown [66.92.189.79]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by sizzo.org (Postfix) with ESMTP id 4AB075273F7; Mon, 3 Dec 2007 22:50:58 -0800 (PST) In-Reply-To: <4754E2A0.5090103@chiaraquartet.net> References: <4731278C.8020301@chiaraquartet.net> <4731F977.4080502@zend.com> <4753B087.4020206@chiaraquartet.net> <003601c83582$a1b16fc0$e5144f40$@mcnaught@synergy8.com> <4754807B.80408@zend.com> <4754E2A0.5090103@chiaraquartet.net> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <0A926DF2-DCC5-4A5C-B225-7DB81813AC4F@tekrat.com> Cc: Stanislav Malyshev , scott.mcnaught@synergy8.com, 'internals Mailing List' Content-Transfer-Encoding: 7bit Date: Mon, 3 Dec 2007 22:58:25 -0800 To: Gregory Beaver X-Mailer: Apple Mail (2.752.3) Subject: Re: [PHP-DEV] ignored patches From: shire@tekrat.com (Brian Shire) On Dec 3, 2007, at 9:16 PM, Gregory Beaver wrote: > Brian Shire wrote: >> >> On Dec 3, 2007, at 2:17 PM, Stanislav Malyshev wrote: >> >>>> I am a developer on a CMS also which uses the auto-include >>>> functionality to >>>> include many classes over many files. Each request can include >>>> up to 30 >>>> different files. The speed increase is around the 15% mark when >>>> combining >>>> the files. This is with APC installed too. >>> >>> Can you provide some benchmark setups that this could be >>> researched - >>> i.e. describe what was benchmarked and how to reproduce it? >>> >> >> I've seen this come up before internally at Facebook. Many people >> do a >> microtime() test within there code and consider this a definitive >> benchmark of how fast there script runs. Unfortunately this >> excludes a >> lot of work that's done prior to execution. Typically we see people >> claiming gains from combining files when in actuality they where just >> excluding the compilation time in their benchmark by moving >> compilation >> done via includes() to before the initial script begins >> executing. When >> measuring this type of optimization one really must measure >> outside of >> PHP using something like an Apache Bench tool so you get an idea >> of the >> big picture. I think trying to optimize these also presumes that >> you're >> already running a bytecode cache etc. > > Hi Brian and Stas, > > I hate to say it, but it is somewhat condescending to assume that the > benchmarks were done with microtime(). I spent about 15 hours of my > time designing a very complex, carefully constructed benchmark, and > yes, > I ran it with apache benchmark. In addition, I ran the benchmark > using > no APC, with APC, and with APC and apc.stat=0. The benchmark in > question compared require_once to include with full paths to a single > file. In the best case, I got a 12% performance difference between > include with full paths and apc.stat=0 and a single file. Hi Greg, I'm sorry that my message probably did come off as condescending. :- ( I really just wanted to share some my *own* pitfalls in case it was something that might be helpful here. If you aren't too put off and you are running APC then perhaps we can discuss more off-list as some of our performance problems may be similar and I could exchange some optimizations with you to try out. Again *extremely* sorry for insulting you or anyone else here with my not so well thought out email, I'd just like to try to help out a bit. -shire