Skip to content

[opt] use scandir to shorten initialization time of Inotify #45

@NoneGG

Description

@NoneGG

I want to use inotify to monitor video files on cdn server, and it takes too long time to initialize the InotifyTrees when i run the demo script (about 1061070 files)
I notice that os.listdir is used in the code, is there any possibility that we can use scandir.listdir (it is said that scandir will be merged to Python3 official in next release) to optimize the initialization speed?

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