Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126161 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 78D021A00BD for ; Sun, 22 Dec 2024 04:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1734840162; bh=uOAqJ6K4UxwpxU0bdHGsQFiKpXIH9PmxWC9aWzxm8Ew=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Hhlf27Wz1c9m862syHTr1XgEMxQW3Usox3GOmTatwsJWGijcQjllwL77atS5CV06v crQsxRjMxO1vLAKFWGuvssttpYf20xXUVk03ULXDaIBp2W0jCWfdBV56eMSCsVAHu8 kYvoUFUROb1r1Oy3apub34kQUA9+R3M9XIm86+H3/VrXIMI6255qARVypRUiKXgmit WxWvnXNC98X7uK4a7RuYM15SjVrAcjBI6cgYAKCpI6flc8ZwYnPb6fERkxr4+u2FKd qTnPu6PdtnxUDJKaHUCr/9olnFS9F6QaWiwTkY3oCj3b5dyhDjBMOpvcwiWnEJaeZM rImGEUexQ0gzg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 88F031801D7 for ; Sun, 22 Dec 2024 04:02:41 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (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 04:02:40 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 6D4351140176 for ; Sat, 21 Dec 2024 23:05:42 -0500 (EST) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-01.internal (MEProxy); Sat, 21 Dec 2024 23:05:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1734840342; x=1734926742; bh=AuOn6cyB6vkUCRXtQ5OD8 sd/3mamM/AomSYtyx8w9xM=; b=VaYUbFsVbVSXwJ5iCdC5uYZcy46obXBbYH9vO 4VgoniBdtB4UDzVehVqJalXKguy0OP1joCHexzRo8Ga+EyZz4LWlZz9M09qST4O4 aOGH/RN/GXF2AlRMhfkE7R7P29eCpdiTAVNjOmMXPLpv18A7af5NgLikW71WHYv7 HkFxCZZNszkBbl3PERNex1lY2atpP1u2GIjMhHMGHZk9WV7Zs4DcUAaQz75qj6N7 mOcdAjLW9AzmgQihww4Y4YCpGCWx7ic2gAlZC+eLm7Euvv7Wf6f4RnDtNTT0mgoM C6XGMpSC7vp80UydvQLvtCJ0YfJgJv+N7JiIsx/4ddRSY9mAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1734840342; x=1734926742; bh=A uOn6cyB6vkUCRXtQ5OD8sd/3mamM/AomSYtyx8w9xM=; b=sTOZpJG8d9k4inDJt i+6olptpErsAKj6NXsznVGVVyPAjIOGjEAGJoe6r9MqDIroehk1lJy/EVYXOyL6O K4wGpU27HaVp8yMCk8TWx1JratGhy7Tf6TTQnOnz4qmG1VWn6at7oKptg/KyKLI6 XV1vHsH8oG6GJZ3pxRil1x9SKfTUMpbRuZggmW+vvpH1jCQozArjofo729rVhGWp QR13EJmomuPJIYW4dXL8fxdY3KWzjbu9sj6uwTVrWl1HjtSwK7JNcyekmCT1U4Di AcbuAvgL+BceTi356+guXI0aaIiSqvqzlZUvup9hrcxgKgFuhWgNXGH+E5tjRIne mZ50w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtiedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredttden ucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfih gvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpedugedvlefgueegheefjeet ffduveeltefhfeegjeffffelgedttdevkeegkedugfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggt hhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id E367929C0072; Sat, 21 Dec 2024 23:05:41 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sat, 21 Dec 2024 22:05:20 -0600 To: "php internals" Message-ID: In-Reply-To: <062201db53e5$7c7043f0$7550cbd0$@glaive.pro> References: <27531d9d-9bfe-4acc-b9ab-80b1017e3038@app.fastmail.com> <062201db53e5$7c7043f0$7550cbd0$@glaive.pro> Subject: Re: [PHP-DEV] Discussion: Remove file statcache? Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Sat, Dec 21, 2024, at 2:18 PM, Juris Evertovskis wrote: > While it is nice the Symfony and WordPress wouldn't suffer a lot from > dropping this cache, what's the impact on scripts that are processing > hundreds of files? > > Would doing ` $stat = stat($filename);` instead of separate calls to > `filemtime` and `filesize` actually be important? Or would it still amount > to 1% performance difference on an SSD? The limited data so far suggests it isn't that important, unless you're doing filemtime(), filesize() together in order over hundreds or thousands of files. In that case, calling stat() would be better, though by how much is unclear. Or using SplFileInfo(). (I have no idea if it uses the stat cache or loads the stat data once and just exposes it through methods.) > I mean, are there cases when this cache is still useful in 2025? That is indeed the question. :-) I think so far we can say "not most of the time," but haven't yet figured out all the possible edge cases. --Larry Garfield