Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39392 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17719 invoked from network); 28 Jul 2008 04:04:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2008 04:04:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=nunoplopes@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nunoplopes@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.191 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: nunoplopes@gmail.com X-Host-Fingerprint: 209.85.128.191 fk-out-0910.google.com Received: from [209.85.128.191] ([209.85.128.191:6709] helo=fk-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/D2-31471-5454D884 for ; Mon, 28 Jul 2008 00:04:22 -0400 Received: by fk-out-0910.google.com with SMTP id 18so3219361fks.7 for ; Sun, 27 Jul 2008 21:04:19 -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:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=JoOWdLb7/OvPAh8+EDxmXjs4iZCi3C8SFMYYWeF33f0=; b=kB3zOLlUkObKnPO15lREFQq/yxcO/iVf5CWJi2m1ueQOT/V+LXDRIS2V9plmMhqqMp pt9CLiTbrGFJFCeONmmMrDaQverv6ebcu0+MH0DwZ1SSxAvg9tH1hDKARrZRpfqTmnXM rCM1jOb6C5DgIGjkXPLzCY2aqYm4yuWLB9+n4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=F+lpAJBwLWPqtgfZrT7+9mmBlIQk1ajakddhE+dJ3xadd70me6mk8KcAA3WvXpd7qb soYNmeuf1mgQMdDsIo0ooOPVG/GI00mtsocnJCErh5B/r+Mog6J51dNDpSbPzxFhOXRp W/jyIsBcAVojdkk95u1c48RHZ4zl+4iFy7oho= Received: by 10.125.81.17 with SMTP id i17mr260158mkl.49.1217217858860; Sun, 27 Jul 2008 21:04:18 -0700 (PDT) Received: by 10.125.92.3 with HTTP; Sun, 27 Jul 2008 21:04:18 -0700 (PDT) Message-ID: <7ca798440807272104o744ce8e6oee52f0e1f9cc4074@mail.gmail.com> Date: Mon, 28 Jul 2008 05:04:18 +0100 Sender: nunoplopes@gmail.com To: "Dmitry Stogov" Cc: "Matt Wilmas" , internals@lists.php.net, "Andi Gutmans" , "Stanislav Malyshev" In-Reply-To: <488C5464.1030706@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <00ea01c8a160$2edd8160$0201a8c0@pc1> <016c01c8eccd$e28cfac0$0201a8c0@pc1> <488835D0.1040005@zend.com> <00e501c8ed77$3498cf20$0201a8c0@pc1> <48889901.8000008@zend.com> <022c01c8ee74$5b539340$0201a8c0@pc1> <488C5464.1030706@zend.com> X-Google-Sender-Auth: 4f095b3c85ce2cb7 Subject: Re: [PHP-DEV] New optimization idea; was: No runtime fetching of built-in global constants From: nlopess@php.net ("Nuno Lopes") I'm not Matt, but I'll try to answer :) Actually the new re2c scanner already handles the shebang thing, so I think you can safely remove the explicit support for it in CGI. We had to had that because CLI doesn't explicitly support the shebang line. Nuno P.S.: now it makes sense why we never found the code in the flex scanner that handled the shebang line :P On Sun, Jul 27, 2008 at 11:56, Dmitry Stogov wrote: > Hi Matt, > > At first as you are a scanner expert, I would like you to look into another > optimization idea. > > Probably for historical reason PHP supports shebang lines > (#! /usr/bin/php) on top of php files. Especially to handle them PHP > (CGI/FastCGI/CLI) opens file and check for it. So even with opcode caches > FastCGI PHP does open syscall for the requested script, however with opcode > caches it's absolutely useless. > > In case PHP scanner will handle shebang lines itself, we will able to save > this syscall. > > I never had time and enough flex/re2c knowledge to implement this idea > myself. May be you'll able to look into the problem. In case you find a > simple solution we will able to do it in php-5.3. > > Most PHP hosters and large sites use FastCGI with opcode caches (it is also > the primary way for MS Windows users), so this optimization is really > important.