Skip to content

stat is being launched for every file that is scanned. #8405

Description

@StyXman

I just installed NC 13.0.0 and I noticed that it was taking a lot to scan my photos. I attached an strace the the scanner and I found out that's it calling stat for each file! I'm not talking about the C or PHP function, I'm talking about coreutils' /usr/bin/stat!

This has a huge performance impact in my server, and looking at the code, I can't figure out why this is tried before using the PHP function filesize(). And why it isn't even using [stat](https://secure.php.net/manual/en/function.stat.php)? Not to mention that is not calling escapeshellarg() either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions