Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103499 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69212 invoked from network); 26 Nov 2018 11:28:09 -0000 Received: from unknown (HELO NAM03-DM3-obe.outbound.protection.outlook.com) (40.107.80.108) by pb1.pair.com with SMTP; 26 Nov 2018 11:28:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2LyxKl1SYA6nRArifkp3BsO4wlrYABKDL2Ip+Snjf88=; b=t3M5ojk/uB9YniGazXYVqRM+FF+tZ0Xwk0TOrysGd1JC0Ihh4OVsknhn3nigs5iRlN8+X0BYchjUP+IW4ez/eIHmoJ+WHCZkeQt+VDBvEu4ZIqmOeX43dfMppRL91Jn1fcDtKeHBSCsBA9hJqDtz7QDZ5+GZs2k4AFUMtSw4jxI= Received: from BY1PR02MB1260.namprd02.prod.outlook.com (10.162.109.14) by BY1PR02MB1242.namprd02.prod.outlook.com (10.162.108.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.15; Mon, 26 Nov 2018 07:51:26 +0000 Received: from BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::d820:ec53:686e:d032]) by BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::d820:ec53:686e:d032%6]) with mapi id 15.20.1361.019; Mon, 26 Nov 2018 07:51:26 +0000 To: Marco Pivetta , Zeev Suraski CC: PHP Internals List Thread-Topic: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)" Thread-Index: AQHUgxKMYogqZPZudUmsS4r/pLxAKaVdIu2AgAAsRayAALAvgIAACOsAgADiJoCAAG9OgIAAmGKAgAEVAgCAAAJ0gIAAp1Je Date: Mon, 26 Nov 2018 07:51:25 +0000 Message-ID: References: <1cb7fecd-22ba-0ded-5bd6-e70208053012@gmail.com> <7f65012b-e26a-fb58-718b-b35569e53d03@gmail.com> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [212.232.72.197] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR02MB1242;6:7nvyeiPt6sR2vMI18ELpMbfTEmOc7TYt5NaVhFqOrsXlTHBXKAnEznW0LkCvpESTPyzSagg6L947q9hD6scu7OSvV6ID7Uu7DW87Qv0MXlrGrO0vRzHm9Qi93esNB97BcSlRClX2k2zn77e9Hv03oqgDPDKL2gmqI2wD4EZ6A+e7SFe4SncUX0lIXwSs87js9/myAX0/dfVNlfVPbpPLvBMYzNO0cwUaPby4IhfZTK8huuKmUqP5DV0r7nJsieQjK/oASTkWKQP27Y+qGeTvK4LRNgYcmveeL0dll1fLfM3DwkErPt3rKCtW0dwpGh8u6Q8xscwfZQ8szXYiEts7MnJJKkLgE5sjDhZHMeSdW8x4AlIj+rp0tudO61oxWPMSPvlHFovyXtDBZHJZwT8gbffiCZeBHuqINNNzp+mJUXgJVnzhl0TT1/Fos1CXOMR9JivVZji80QAQtpjMkKAsbw==;5:ONgWfzwBdZAgnp1EuJd/lpOjYFs/e5u3iCd7zWQiOcvCnK79kKePNKmI8iiaI8B8sfhIWWr5WK/SsYbvgVScgXR4TSKt3U66eU+7ZI1Du5NPLQKq9HeGCWCEeR94zp/tYzxsNToG9rDP0m6Bf9ni9kkm3CyG80V5ZWrJZLUuT9Y=;7:hTGJDEHonBc6q9TplhkKbyMMTtY5ZEiWwsKtETe1vrsDIjkB0faBMCkXZv26VFNQZhmotEksHN/kdyMSSARPY3VkWMn99Eh8NKEYWUMhhs4iq4kNRuDlTT4Rx7dPzNnxRxgvavWqRezi2iFot5V98g== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 6842654b-7afc-4b3f-d155-08d65373f7aa x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BY1PR02MB1242; x-ms-traffictypediagnostic: BY1PR02MB1242: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231443)(944501410)(52105112)(148016)(149066)(150057)(6041310)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:BY1PR02MB1242;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1242; x-forefront-prvs: 086831DFB4 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39840400004)(366004)(396003)(376002)(346002)(136003)(52314003)(189003)(199004)(76176011)(93886005)(74316002)(7696005)(39060400002)(229853002)(106356001)(478600001)(8676002)(8936002)(54896002)(33656002)(476003)(5660300001)(81156014)(9686003)(561944003)(6506007)(66066001)(25786009)(102836004)(4326008)(99286004)(14454004)(186003)(6116002)(55016002)(3846002)(26005)(6606003)(97736004)(86362001)(110136005)(7736002)(316002)(71190400001)(71200400001)(256004)(53936002)(105586002)(446003)(486006)(6436002)(53546011)(81166006)(11346002)(2906002)(68736007)(19627405001)(6246003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1242;H:BY1PR02MB1260.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zEPlhZL22lwIPO2NgQ3zsKgqri+uCJsD2NmKJ3mapUXkZWkd9c1DwhpeylLGvMLKLeoDDG48eK2OvU9Tyz9urFXRCEseEjdhEDHOgcbqwF95jgpHfdSzJiAGKntniUY6ZUd+R2l/NdvQWNQJHHH+jfvM9d+xxnY6iooVh091nnhOfgy/etrTAKa9T75NI50JxL8dd9dnz8w+lBX2wYPfTCFGh/2rdyu3he6HSQitGdu+sZcF/+fu8ddqn/T/YNM7vUXYN0c1E+YdByt746N8dtgJySDODpgBgJIYOgm1WdBGnuloBD/GsQEG8XuWc5OpRbpNVuhMv/CFoSMHWantppyo4qE8YysAszgCO2bSAn4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY1PR02MB1260BE27F8CA388956EB37AABFD70BY1PR02MB1260namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6842654b-7afc-4b3f-d155-08d65373f7aa X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Nov 2018 07:51:25.8242 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1242 Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)" From: dmitry@zend.com (Dmitry Stogov) --_000_BY1PR02MB1260BE27F8CA388956EB37AABFD70BY1PR02MB1260namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable OK. I didn't think, this feature required explanation. I saw this like a si= mple way to separate "data" and "code". Anyway, now I see, this can't be accepted without RFC etc Thanks. Dmitry. ________________________________ From: Marco Pivetta Sent: Monday, November 26, 2018 12:43:15 AM To: Zeev Suraski Cc: PHP Internals List Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare= (cache=3D0)" Is that space rrrrrrreeeeeally a problem? Take the example ZF loader from the RFC: that barely makes any difference at all. A stronger reasoning for another language construct (that changes engine behaviour) is kinfa required. On 25 Nov 2018 22:34, "Zeev Suraski" wrote: On Sun, Nov 25, 2018 at 7:03 AM Marco Pivetta wrote: > Adding to the pile of "it's an edge case", since the preload scripts will > be procedural, wouldn't it be sufficient to call > `opcache_invalidate(__FILE__)` at the end of them? > > That would actually not do anything useful - as the file will (in all likelihood) never be accessed again anyway. Invalidating a file only ensures it won't be fetched again from the opcache - it doesn't actually free up the space it consumes. Invalidate it or not, in both cases the outcome is the same - a bit of memory consumed by a file that will never again be fetched from the opcache. I believe this is what Dmitry's proposal was about - not putting the file into the opcache to begin with, to save the bit of memory that it would otherwise consume (but I could be wrong, as the savings are likely to be so small I'm not sure why we would care about them...). Zeev --_000_BY1PR02MB1260BE27F8CA388956EB37AABFD70BY1PR02MB1260namp_--