OK. I didn't think, this feature required explanation. I saw this like a simple way to separate "data" and "code".
Anyway, now I see, this can't be accepted without RFC etc Thanks. Dmitry. ________________________________ From: Marco Pivetta <ocram...@gmail.com> 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=0)" 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" <vsura...@gmail.com> wrote: On Sun, Nov 25, 2018 at 7:03 AM Marco Pivetta <ocram...@gmail.com> 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