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

Reply via email to