[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)"
From:       Zeev Suraski <vsuraski () gmail ! com>
Date:       2018-11-26 9:18:28
Message-ID: CAJHtznwiW5XjkQuw_hKh8QgB6oO9j7maaag6v8kpw4ZdcFM3oA () mail ! gmail ! com
[Download RAW message or body]


On Sun, Nov 25, 2018 at 6:04 PM Sara Golemon <pollita@php.net> wrote:

> On Sat, Nov 24, 2018 at 11:03 PM Marco Pivetta <ocramius@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?
>
>
> >
> I suppose the only negative there would be some very minor fragmentation,
>

One thing that's worth mentioning is that there's no fragmentation ever
with OPcache - because we actually never reclaim freed space (only during a
restart, where, well, we start over completely with a clean slate...).
Once a file is in the cache, the space it consumes is never freed and can
never be (re)used by another file.  Excellent strategy to eliminate
fragmentation, not quite as good for reducing memory consumption though :)

Zeev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic