Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126169 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id D4A9A1A00BD for ; Sun, 22 Dec 2024 15:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1734882725; bh=e8AHEXgAYh6qmtFc8GMaiM4SoqcD1nkmAG5Eu8Uvvd8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Mw5qyU5iIYgKCPYLHAoe3eZOIkIuD7Lc7xKrVf9woS5LQZHlGfhtLUrw1BNcvM1PE vsxPQkKGP2Ruu1JQy7toumtTKW20E6o72rWm9I+DHn1alrCRPR3s8bgenascSCpFhz kNrEk3o4CQZCf+IJ4Qv3JKDaWqEdlJnv2CoO2H+iWYCNjf5O78WcPuNTqRyaEHMUnJ itdxeeWOZh8MbKh8vBFgmhEJoWlhkd9+xp7OAmwevELUkIdKd43CN49BzMNWLvBJgZ oN8gJMvrsHy5eiZ4INGBIAKOg7CnWs5N7fSevF8Ayk7VQGc1aLY5rcQp+z5EAAjILa QrpBPzHoGVBxQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1FBF118007C for ; Sun, 22 Dec 2024 15:52:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from supercat.cmpct.info (supercat.cmpct.info [71.19.146.230]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 22 Dec 2024 15:52:04 +0000 (UTC) Received: from smtpclient.apple (fctnnbsc38w-142-162-55-237.dhcp-dynamic.fibreop.nb.bellaliant.net [142.162.55.237]) by supercat.cmpct.info (Postfix) with ESMTPSA id 5293F54AA7; Sun, 22 Dec 2024 15:55:04 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: [PHP-DEV] Discussion: Remove file statcache? In-Reply-To: Date: Sun, 22 Dec 2024 11:54:52 -0400 Cc: Jakub Zelenka , Larry Garfield , php internals Content-Transfer-Encoding: quoted-printable Message-ID: <209D4AA4-99BD-4861-B1A4-1BEB80DD3CF2@cmpct.info> References: <27531d9d-9bfe-4acc-b9ab-80b1017e3038@app.fastmail.com> To: =?utf-8?Q?K=C3=A9vin_Dunglas?= X-Mailer: Apple Mail (2.3776.700.51.11.1) From: calvin@cmpct.info (Calvin Buckley) On Dec 22, 2024, at 10:57=E2=80=AFAM, K=C3=A9vin Dunglas = wrote: >=20 > On Sun, Dec 22, 2024 at 10:44=E2=80=AFAM Jakub Zelenka = wrote: > Thinking about it, there might be a possibility to address it (at = least on Linux) using fanotify. Not sure about other platforms but maybe = there are some solutions to address it. Also it might get a bit complex = and not sure how much the solution is viable. >=20 > For FrankenPHP, we successfully use https://github.com/e-dant/watcher = for this kind of usage. It supports Linux (fanotify, notify, epoll...), = macOS, and Windows, and is very efficient. > It's a C++ library but with pure C bindings. >=20 > Best, I think watching files makes sense for FrankenPHP's use case of development server, but I can't imagine the overhead and non-portability makes sense for the stat cache. I feel any gains you'd have from stat cache would be offset by that. And it'd be unfortunately the only way to actually solve the "external thing changes thing behind the stat cache's back" problem.=