Skip to content

Dibi event performs too many filesystem stat calls #426

@maryo

Description

@maryo

Hi. Thanks for the library (and for the others OFC :-]).

I'm not sure what is the exact reason why there is the is_file check in
https://github.com/dg/dibi/blob/master/src/Dibi/Event.php#L66

I believe it's something clever but I'm not sure what is the condition trying to prevent, evaled source? Or something else could be there?

Perhaps it's not intended to use the logger/profiler in production but we do it to collect some metrics (and not only metrics).
When it's enabled (or a listener is registered) then each SQL query performs several system stat calls which slows our server.
Looks like it does not hit stat cache (stat is actually cached just for the last stat check).

So... what about removing the is_file entirely or replacing it with something else? ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions