Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103501 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86207 invoked from network); 26 Nov 2018 12:55:19 -0000 Received: from unknown (HELO mail-qt1-f169.google.com) (209.85.160.169) by pb1.pair.com with SMTP; 26 Nov 2018 12:55:19 -0000 Received: by mail-qt1-f169.google.com with SMTP id d18so16697950qto.8 for ; Mon, 26 Nov 2018 01:18:40 -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=cu8nlVtpk0+miHj6iPnOk1ATDiQPpA9XoCnnIBcQ4LQ=; b=au2g39BzeMuTbF15cOVqpoq/7po/zgB4K45POq99CfrJer5RDYKNlK0KLRrcx48JL5 3ppPJ9gjGofy/b7+/okL1rS8vi0RjtPcu5KbriWrQrpsykbhyMIax4zZlSE66XdOaXEF N6gILDH32oCrbi4rD4435Tp46oz7F/50bB/f84URKPu9jz9EWDRHJzRGkhuYjqJizb1q akcRvz7k5hOsEPKiB0wgK12RMJhJewAt1hvYhRsa324tI/WGQ17dedqJsaUoW1Tr2/Bx z71RYAlMS6yEPIHwDz3IBJRrBhXqRDBU23SnEiCvgfpeM9HcP6aihyuBGMcVGFq3eQXb 86Hg== 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=cu8nlVtpk0+miHj6iPnOk1ATDiQPpA9XoCnnIBcQ4LQ=; b=K/wkBZw8lYb2g4L/0wqgyhsYK4poBb01FNsb06jPKT8na7SycJtBMnevytofcTydIs ZPEi29L8kjt+a2tUUI0c5htyxIMj/+zUGg4gFEg44u/2bUIpcoVR6vUCk269YShwguv7 RlMy6+a9lRF4q9Hk5qWAaff50cdO63kclEL//ipMXqH9Ra6t9JGKfZ7N7oUQOzel2wkU WynAPwJvBg34ihBJFqCdrRLdKdC3mPETEiRvXWux4vwBe163xuRlQ4AeutP8neOT3pIJ VtAzjHupeTzIyvhVBh3Cm8C3okOSTZgdmE17XsAC89iXz1geWoj33YGd3w7tdi4z2D+S GWHA== X-Gm-Message-State: AA+aEWaP76/cS/rXhrhm8wxtfHuLjhH0uxUAwal40rFpkQMRrPwzv3YO CgPiRUGFUbBpX1rX2kVVv4V7HKkbS5TjQ9QhRqmtEofo X-Google-Smtp-Source: AJdET5f5gR9Hnxh1aeKPGDB3yf+Td8QJzJAD/djs4enCH526cbHjqfYhEMwGUc+NLNJxQ57jW+sy+to5v9QGAi1fXg8= X-Received: by 2002:ac8:3d8a:: with SMTP id v10mr24621151qtf.74.1543223919666; Mon, 26 Nov 2018 01:18:39 -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: Mon, 26 Nov 2018 11:18:28 +0200 Message-ID: To: Sara Golemon Cc: Marco Pivetta , Stanislav Malyshev , rowan.collins@gmail.com, Internals Content-Type: multipart/alternative; boundary="0000000000008a6d29057b8dd13e" Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)" From: vsuraski@gmail.com (Zeev Suraski) --0000000000008a6d29057b8dd13e Content-Type: text/plain; charset="UTF-8" On Sun, Nov 25, 2018 at 6:04 PM Sara Golemon wrote: > On Sat, Nov 24, 2018 at 11:03 PM 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? > > > > > 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 --0000000000008a6d29057b8dd13e--