Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103497 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65129 invoked from network); 26 Nov 2018 01:11:31 -0000 Received: from unknown (HELO mail-qt1-f177.google.com) (209.85.160.177) by pb1.pair.com with SMTP; 26 Nov 2018 01:11:31 -0000 Received: by mail-qt1-f177.google.com with SMTP id d18so15502245qto.8 for ; Sun, 25 Nov 2018 13:34:44 -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=thQvHmzguHe6H7KYFMJI6OpCJGw0J18bDUSebh79rro=; b=l7BMz6o9pr7dfYXbQX6qQL45hpBP1JVu9LLhtfYTmGnG2zQh1N+mW4IruY69sJQ1tN fnV+wSkptAerc0N216Dmz1V/qgfl3XV1K9JUYxwuMLCi2eMIoJrEVUZR6/YymXgGzFg1 2mxk+oLuaclt6RLU+ByESpSvfp6/m4tn74xUNPgyHk7qpF23WZ2z2KRXxtqtWrR+9V5R hoX+zWkYnsDJplW3ybTUZtF2TP4Axxcf+Z1+gW1r0MCCQx/5PA/0KAL8EiAmgPDeX/m8 5WtptX1+CJCzvaliJ3w983P+LppQRXc89AG1ANF1/ymUwEXDQeCqJ9gaviy+gxGiug1q st+g== 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=thQvHmzguHe6H7KYFMJI6OpCJGw0J18bDUSebh79rro=; b=iTQlzmMM6UWMed5+ivc3ZDZs/ICgM8OdXF6cXJqpOFtNwza2DNuStCSbMffa1eGWH4 wak1lvrjs41dipXaRh5jtM4RZE1rf+CmmJzYS1jIzRIqIGE76BgyXQkOFYeNsZ2p9/55 xwdJipTRIQ52na6p1OSNSiY8XqIo+giIBNwOYnrY1i0l1KNE/eLaIEQYLxhPJgafwy6Y /twBeF20Xg4M7WaHzgh3oEbfR9f5Fz1zmuryzmcq5N5wYm3M/eLjJRzm6aIlETwT/8Pp 4vjTnafIqfw4hNcDI4lTiqXzubpQSyTXEU9gX45TKV7l9dBBX6xnCIKAeBJVmeCH5lOD vQjA== X-Gm-Message-State: AGRZ1gJ4+u6kZ21so7QKTx6mWEt5cTL1m5bCmt4dvI6dyG2siuC7g2uJ M0nAnWKOGhBSX/o2k3zJjR9Q7ldVQtBydkapYAU= X-Google-Smtp-Source: AJdET5cWRnY498rl3jHF2poUyoQ0Xzj5/FxuImmXjsA3xLEC3Z0a6atQwaO++a+zdvdHURANXUiyJX3l2V3sO42y6B0= X-Received: by 2002:ac8:3f2d:: with SMTP id c42mr23293107qtk.33.1543181683798; Sun, 25 Nov 2018 13:34:43 -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 23:34:28 +0200 Message-ID: To: Marco Pivetta Cc: Internals Content-Type: multipart/alternative; boundary="000000000000163853057b83fc57" Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)" From: vsuraski@gmail.com (Zeev Suraski) --000000000000163853057b83fc57 Content-Type: text/plain; charset="UTF-8" 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 --000000000000163853057b83fc57--