Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66168 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54095 invoked from network); 23 Feb 2013 06:53:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2013 06:53:58 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.212.54 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.212.54 mail-vb0-f54.google.com Received: from [209.85.212.54] ([209.85.212.54:58986] helo=mail-vb0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/22-35372-48768215 for ; Sat, 23 Feb 2013 01:53:57 -0500 Received: by mail-vb0-f54.google.com with SMTP id l1so861714vba.41 for ; Fri, 22 Feb 2013 22:53:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=urZUQuFYZW+seP+MLznzoGcxIJ2QEfboqyJfz+mSeec=; b=L+11d68L10khm/3wtBVkA6qYmbTZWtciVS+jLmbTROOqrz+1PHebHsLI/4PSYzbVwo aJZKoFxMjDC/E16Q93amYYIPW6BX1ctPYvUkUQJGfeNVl0xIgPzfr1xwqhwuVirPUOkT zcdlZJ7aJGn3NQgE1hnHhSwZyO10wj0FO3EbTFL1ZxD3lSa5YXG7O6Nqi5F4pYZQR889 ejdknqbgA9J97VnNu0XLui0bxToZy4YjQnGYVNF5noQYYyqBOXMZ+bnzAiGc6/Z0ngwD JPZ9in9Snr+lVh+BP6PTm+kVe61fKKYyAttJVBKH8zcMer5TWJLSuNW3hZTV/e6J++WV UcJg== X-Received: by 10.220.153.143 with SMTP id k15mr6304876vcw.13.1361602434445; Fri, 22 Feb 2013 22:53:54 -0800 (PST) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id yu12sm7971016vec.6.2013.02.22.22.53.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Feb 2013 22:53:53 -0800 (PST) Message-ID: <5128677F.6070504@lerdorf.com> Date: Fri, 22 Feb 2013 22:53:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Dmitry Stogov CC: Stas Malyshev , PHP internals , Zeev Suraski References: <511BC60E.4090409@lerdorf.com> <1121490185476198887@unknownmsgid> <511C0B39.50407@lerdorf.com> <511C78D0.3040501@lerdorf.com> <511C7F82.9030108@sugarcrm.com> <51283E13.7010500@lerdorf.com> In-Reply-To: <51283E13.7010500@lerdorf.com> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQl3oYCA9Pabx6DSDqiI5023aodzqrL0DWMWgnxJHdSjvYfOu0uOrd86prvJbLtLqsF+F8Z1 Subject: Re: [PHP-DEV] Zend Optimizer+ Source Code now available From: rasmus@lerdorf.com (Rasmus Lerdorf) On 02/22/2013 07:57 PM, Rasmus Lerdorf wrote: > Hey Dmitry, I noticed today that ZO+ doesn't make use of sapi_get_stat() > to get the initial stat struct from the sapi if available. So, if you > have top-level a.php that includes b.php and c.php you end up with: > > stat("/var/www/a.php", {st_mode=S_IFREG|0664, st_size=49, ...}) = 0 > stat("/var/www/a.php", {st_mode=S_IFREG|0664, st_size=49, ...}) = 0 > stat("/var/www/b.php", {st_mode=S_IFREG|0664, st_size=10, ...}) = 0 > stat("/var/www/c.php", {st_mode=S_IFREG|0664, st_size=10, ...}) = 0 > > whereas with APC you have: > > stat("/var/www/a.php", {st_mode=S_IFREG|0664, st_size=49, ...}) = 0 > stat("/var/www/b.php", {st_mode=S_IFREG|0664, st_size=10, ...}) = 0 > stat("/var/www/c.php", {st_mode=S_IFREG|0664, st_size=10, ...}) = 0 > > That initial stat on a.php is done by Apache and because ZO doesn't grab > that existing stat struct from the sapi it has to re-stat the top-level > script. > > Was this an intentional thing to leave out or just an oversight? A very quick a lightly-tested implementation: https://github.com/zend-dev/ZendOptimizerPlus/pull/40 -Rasmus