Skip to content

Make Razor LiveShare _ViewImports acquisition not block LiveShare session start. #13833

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

Closed
NTaylorMullen opened this issue Sep 9, 2019 · 1 comment
Assignees
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one Tooling This issue has a tooling impact, which means the execution and release should be in sync with VS rel

Comments

@NTaylorMullen
Copy link

For larger projects we need to query all of the .Razor files on the host machine. This looks to be expensive on LiveShare session start.

To optimize this path we can lazily acquire all of those files which will impact users who immediately open up Razor files (they wont get accurate IntelliSense/completion); once those _ViewImports are "acquired" the files will re-parse and errors will go away.

@NTaylorMullen NTaylorMullen added enhancement This issue represents an ask for new feature or an enhancement to an existing one cost: S area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Tooling This issue has a tooling impact, which means the execution and release should be in sync with VS rel labels Sep 9, 2019
@NTaylorMullen NTaylorMullen self-assigned this Sep 9, 2019
@NTaylorMullen NTaylorMullen added this to the 3.1.0-preview2 milestone Sep 9, 2019
@NTaylorMullen
Copy link
Author

Throwing this into preview2 since this should go into the 16.4 milestone and shouldn't take much time.

NTaylorMullen pushed a commit to dotnet/razor that referenced this issue Oct 15, 2019
- Prior to this LiveShare initialization would block until our ListDirectories tasks succeeded; in the case that the host project had a significant number of Razor files the acquisition operation could take a significant amount of time. This change starts tasks in the background to acquire _ViewImports dynamically.
- Added CTS flows so if the service is canceled while creating or if a user closes their LiveShare session we stop acquiring _ViewImports.
- Added tests to validate CTS flows and background acquisition of _ViewImports.

dotnet/aspnetcore#13833
NTaylorMullen pushed a commit to dotnet/razor that referenced this issue Oct 17, 2019
- Prior to this LiveShare initialization would block until our ListDirectories tasks succeeded; in the case that the host project had a significant number of Razor files the acquisition operation could take a significant amount of time. This change starts tasks in the background to acquire _ViewImports dynamically.
- Added CTS flows so if the service is canceled while creating or if a user closes their LiveShare session we stop acquiring _ViewImports.
- Added tests to validate CTS flows and background acquisition of _ViewImports.

dotnet/aspnetcore#13833
@NTaylorMullen NTaylorMullen added Done This issue has been fixed and removed Working labels Oct 17, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one Tooling This issue has a tooling impact, which means the execution and release should be in sync with VS rel
Projects
None yet
Development

No branches or pull requests

2 participants