Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86627 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30331 invoked from network); 13 Jun 2015 19:04:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jun 2015 19:04:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=jgmdev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jgmdev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.50 as permitted sender) X-PHP-List-Original-Sender: jgmdev@gmail.com X-Host-Fingerprint: 209.85.213.50 mail-yh0-f50.google.com Received: from [209.85.213.50] ([209.85.213.50:35338] helo=mail-yh0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/32-07883-6CE7C755 for ; Sat, 13 Jun 2015 15:04:39 -0400 Received: by yhak3 with SMTP id k3so24227958yha.2 for ; Sat, 13 Jun 2015 12:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=z8daqcCt68qpxztBr11zVHHADZkTsYySeeacISpp/2g=; b=Mgb4M+X3Jr1/zTnQe4R6qYtK4QcdxjMxOTnZUtzidyQR9o/GFPIuShFPfp1yauldu0 O3a7CWR10DhiivCDQ4vUgqJ8q9maioJFawKqxGL3gHcAZJus7WmHHakQbCRcrq8CZKi9 bv8BsR95pr3beXJyOYsYpUDecKIjJefvQ6xlyRQD651BAfV6oCqKnEBBG8SdY18Xizb3 +zbC/Sq6aJCi+fBE2wgcPI6WIVPMyxl7vznjhHs/SYMOR5qm1eAZjmAHCMcfMde7Lx1P o1fEmStqrBadrsQaXopoE1v/74OlVUMUCbHxAp6KEsSckV8p3KF/jC+nS5Luf8feN3dq aRrA== X-Received: by 10.129.131.214 with SMTP id t205mr25463684ywf.26.1434222276438; Sat, 13 Jun 2015 12:04:36 -0700 (PDT) Received: from [192.168.1.121] ([24.139.195.69]) by mx.google.com with ESMTPSA id i186sm5743797ywc.22.2015.06.13.12.04.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2015 12:04:35 -0700 (PDT) Message-ID: <557C7EBE.3010007@gmail.com> Date: Sat, 13 Jun 2015 15:04:30 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Rasmus Lerdorf , 'Jordi Boggiano' , internals@lists.php.net References: <000201d0a4aa$40c2fae0$c248f0a0$@php.net> <557AD880.5070402@seld.be> <110601d0a54b$8ce6a380$a6b3ea80$@belski.net> <557B3D5C.8080100@lerdorf.com> In-Reply-To: <557B3D5C.8080100@lerdorf.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP 7.0.0alpha1 Released for Testing! From: jgmdev@gmail.com (Jefferson Gonzalez) On 06/12/2015 04:13 PM, Rasmus Lerdorf wrote: > You can get even more speed by compiling with --enable-opcache-file and > then in your php-cli.ini add: > > opcache.enable_cli=1 > opcache.file_cache=/var/tmp > opcache.file_cache_only=1 > > Then every time you run composer it won't have to recompile everything. > > -Rasmus > Thats a pretty neat feature, but I was thinking why not make something similar to what python did, where .pyc files where generated on the same path of .py files with the opcodes. So maybe a new ini option can be introduced like opcache.file_local=On. When this option is turned on the opcache would check if myscript.phpc exists before compiling myscript.php, if the .phpc file doesn't exists then it generates the opcodes .phpc version. If no write permissions are available for current directory then php would just skip the .phpc generation. One advantage of this is that if PHP is run on cgi mode (not fast-cgi/fpm) you could still get the advantages of opcode caching on a multiple virtual host environment. It would also be easier to setup.