Skip to content

Browse middleware is synchronous and slow #6

@danneu

Description

@danneu

The handler calls synchronous file-system APIs on the main thread like File.open, fs::read_dir (which incurs opendir once and then readdir on each next() of the iterator).

Each service's call() should do what Root's does and dispatch Req->Res on the thread pool. But it's not clear to me if this is the only problem.

Serve a directory with 5000 entries in it (mkdir dir_{1..5000}). Maxes out at 12 req/sec on my machine.

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