Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103498 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67986 invoked from network); 26 Nov 2018 01:20:17 -0000 Received: from unknown (HELO mail-it1-f175.google.com) (209.85.166.175) by pb1.pair.com with SMTP; 26 Nov 2018 01:20:17 -0000 Received: by mail-it1-f175.google.com with SMTP id z7so7796838iti.0 for ; Sun, 25 Nov 2018 13:43:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4GP4zahNKfqktkINT9ZPk1BmPT+AnQUgeR7XZWB+ALA=; b=FRy07nB38gVBiqZqFFpNukOZh+yfurw2eRqh4ot9QJPuWGykAidBoXhTBODhUGrhrp 85c2yGBTHRzBpmYhK5v8FawcXo4XH3ExjR1Y4pGUTJ5YTxYfaez/Af5bn4yN/CBtWG8r hzzi9LuM1pocmsPa3UcdSljto10WnPwI6drW1cal0Kt/sOJLBnjNuShwqQj6ah33u6Qc suT20mFZwR1aD8vex0DlU6Xk5SlI2bVip+ZUIdV8kuNHSsM6TkARPW0/EJeGgVWn2OtI VVns30iq2SRFN7rTPl15l0FPKbNylD+lZ/mUdURd39EkJdZWHkV0B4qZIScmTS3QrNDA Z38Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4GP4zahNKfqktkINT9ZPk1BmPT+AnQUgeR7XZWB+ALA=; b=rbL3l5aqUr65FCGgyknk8UFoq5p5wiH2nNX14L323zm6QauTluoiwaDNdE/4YoJ8HP 0HVW/ebokFHVxpJ03jc2vcphUFvMa0d3I5/HLvxZkbZ+yHkIhQs+tCdxEYgQchRkchDi 5+hH8zgo2NH7bEPT/jCNIKx7hxinO4u+9iqU/r//QiQogy3lD1ezRJsD9qqiGEyCJiZ6 6wi/+eyrA7SnFklg6UOLOadToSjHlyrd/BenphwTuWTb9UOlIxsWWNf2/wJwFM90XKqJ xW38podAfinqC9y/RsTduoamwlIX0eiof20BV5BoWv/ty2oVy4riEsKJ3ddY0wSr7WUr w/8w== X-Gm-Message-State: AA+aEWbFnprXSmFVXzv8s9kwZPcB4htispAi2Uly6EOttyi82C+mWa65 BHvvgozxyveKDyVV+y6N4Ux0sijkA5+UNIU26h2DdQ== X-Google-Smtp-Source: AFSGD/XUOYrMda/g6O1ygOZtvKD/6CI7NZ7bAh4L9XS6H1sbEAFtUzkHNk92CPSLy2H111pb1i598Ndjr65JddlnQbo= X-Received: by 2002:a02:2586:: with SMTP id g128-v6mr21813263jag.122.1543182209934; Sun, 25 Nov 2018 13:43:29 -0800 (PST) MIME-Version: 1.0 References: <1cb7fecd-22ba-0ded-5bd6-e70208053012@gmail.com> <7f65012b-e26a-fb58-718b-b35569e53d03@gmail.com> In-Reply-To: Date: Sun, 25 Nov 2018 22:43:15 +0100 Message-ID: To: Zeev Suraski Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000726c98057b841be6" Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)" From: ocramius@gmail.com (Marco Pivetta) --000000000000726c98057b841be6 Content-Type: text/plain; charset="UTF-8" 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 --000000000000726c98057b841be6--