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

WebApplication.CreateBuilder potentially inefficient, results in many file system checks #32432

Closed
DamianEdwards opened this issue May 5, 2021 · 1 comment · Fixed by #33081
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-minimal-hosting Perf
Milestone

Comments

@DamianEdwards
Copy link
Member

While debugging through #32415 I noticed that the call to WebApplicaiton.CreateBuilder(args) results in nine calls to WebHostEnvironment.ResolveFileProviders(), which in turn does multiple file system checks via Directory.Exists and creates new instances of PhysicalFileProvider.

This seems inefficient and will potentially impact startup time on systems with slower drives (spinning rust, cloud-mapped drives, etc.) or with AV running. We should investigate whether this can be optimized.

@halter73 @davidfowl

@ghost
Copy link

ghost commented May 7, 2021

Thanks for contacting us.

We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 8, 2021
@amcasey amcasey added area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-minimal-hosting Perf
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants