Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browse middleware is synchronous and slow #6

Open
danneu opened this issue Mar 23, 2018 · 0 comments
Open

Browse middleware is synchronous and slow #6

danneu opened this issue Mar 23, 2018 · 0 comments

Comments

@danneu
Copy link
Owner

danneu commented Mar 23, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant