Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102054 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87385 invoked from network); 18 Apr 2018 17:18:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2018 17:18:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.181 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.213.181 mail-yb0-f181.google.com Received: from [209.85.213.181] ([209.85.213.181:46547] helo=mail-yb0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/64-38944-CED77DA5 for ; Wed, 18 Apr 2018 13:18:36 -0400 Received: by mail-yb0-f181.google.com with SMTP id z16-v6so858206ybk.13 for ; Wed, 18 Apr 2018 10:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=VaMvBSY/cc1wSxvJ492W8483w5HW03BQpYqdGO3CHTM=; b=Ok4mcHp9H+oKGLvpp3/598JKtv7Z76HONdGfXifC5p6VShoAOwVRW57pTt1ioLyP+R pCNPadEhofyUR8p6o289oXsrLcxc/psW8B3eHGcEN4ySEppzzrUcK3hyKUjWXKFxbMlQ nfpUgbldfhhOsjsBa7DW/r/FA4fcFcFENvewbTmI1fbi3I87IurMYXMNnzbIi9lgCSzl PTioQCeJ1l+4/p7n9BwGBcMQvjn1M+AWSueTdTOLtrMsHdS/t1WVvPQsTl10vl8CnnpH mMfkkTmJ5S8WVGlBlUzG8cim7HYApve6GGxyPPn0nxboMFhceGzFFYbQweB9at7gv9eK MTiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=VaMvBSY/cc1wSxvJ492W8483w5HW03BQpYqdGO3CHTM=; b=rjazgJtm6Nlq+vEIwot/0hqLgD0m9Db3hnCpCZpL2g6rqcIF8t6AIRIYqIDQLoqDvU mswxn5S/zbkeKZXtfKuJuFhBOB2i3QpiV3ThyeSZN6/xUM4vos1p2wNvoMaB0nBhFa5D GbOHUDMaDjwT1FVy8QTzSImBHA4Dl29We5P+auNBLah/1tey8Y/8Dl6CRuT8nJpfD5Kp 3sB2EVTrmp/xngdhVDh4xK1A9/SWfp+fBsck+XwgzbE3siwTwMVawckFCqpbvMDKd42X qypaL79LeKls03L56w78j6SVqD3mbBNmdWTlMXEvKpMHCpVYDX25nob1PsiMymrcm6A+ ZMzA== X-Gm-Message-State: ALQs6tCUpo2OZxthGuXqpEUrGPK/nJJr15gqvxd0+ojkNNBknZzbhb/U Il/Q8jH5NCjx6DCYOPaAwTyDHsO7Kr1o2tLJHamo+g== X-Google-Smtp-Source: AIpwx4/Myzh2nh+JiML9ckI8tpFuKutl4y+GNgqWggINfHoKZelb4WT3drQ1zdW2anHWoMrnOmoWfME3q1GCxJiCRSo= X-Received: by 2002:a5b:1ce:: with SMTP id f14-v6mr1900124ybp.382.1524071913825; Wed, 18 Apr 2018 10:18:33 -0700 (PDT) MIME-Version: 1.0 Sender: jakub.php@gmail.com Received: by 10.129.181.6 with HTTP; Wed, 18 Apr 2018 10:18:33 -0700 (PDT) In-Reply-To: References: Date: Wed, 18 Apr 2018 18:18:33 +0100 X-Google-Sender-Auth: rHHdktIYHEYYGvl1AiZ5_035C9M Message-ID: To: Dmitry Stogov Cc: PHP internals list Content-Type: multipart/alternative; boundary="000000000000092a89056a22a562" Subject: Re: FPM preloading of PHP files From: bukka@php.net (Jakub Zelenka) --000000000000092a89056a22a562 Content-Type: text/plain; charset="UTF-8" Hi Dmitry On Tue, Apr 17, 2018 at 5:44 PM, Dmitry Stogov wrote: > Hi Jakub, > > > I though not only about FPM, but a technology for any SAPI. > > Pre-loaded classes and functions might be kept in CG() tables, in the same > way as "internal" ones. > > EG() constants and variables may be re-created at start of request, > executing pre-loaded PHP code. > > Few years ago, I developed something similar for PHP-5. > Yeah that's what I kind of meant by the engine support. :) My idea was more about when it should be preloaded. For example one option would be to preload it automatically if nothing has been preloaded as part of php_execute_script / zend_execute_script. However that would mean to do it for each child (basically use it for all request for the child process life). It should work and might be a viable options for the initial implementation but more optimal would be do it once for all children running in the same pool which could be doable using the pool managers. I think it would be great to have some kind of API so the SAPI can explicitly preload the script. Cheers Jakub --000000000000092a89056a22a562--