Skip to content

Conversation

@davidwengier
Copy link
Member

@davidwengier davidwengier commented Nov 20, 2025

Part of dotnet/razor#12491

Removes the bits of the C# extension that are for the non-cohosting editor. The OmniSharp setting still works as normal. I did it in bits, so commit-at-a-time might make sense, but most of it is just deleting whole files so GitHub hopefully will do a decent job.

There is a bit more cleanup that could happen, and could move some things around now that there is only one Razor system, could remove the word "cohost" from everything etc. but didn't want to make the PR too painful. Will need follow ups anyway, as bits form Roslyn and Razor are removed etc.

Reduces the VSIX size by about 40mb. I'll be honest, I was hoping for more :P

@davidwengier davidwengier requested review from a team as code owners November 20, 2025 10:30
Copy link
Member

@dibarbet dibarbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also drop down the max vsix size on teh artifact tests, so we don't lose the improvement?
https://github.com/dotnet/vscode-csharp/blob/main/test/lsptoolshost/artifactTests/vsix.test.ts

Copy link
Member

@dibarbet dibarbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're deleting so much code I would also be curious if there is an improvement to the extension code load time. You can see the numbers via the perfview.show command. For example for the current version on my machine

Image

@davidwengier
Copy link
Member Author

Not as exciting as I would have hoped, but with both from local builds of the extension:
main:

Extension Eager Load Code Call Activate Finish Activate Event By
ms-dotnettools.csharp true 516 2 131 workspaceContains:**/*.{csproj,csx,cake} ms-dotnettools.csharp

this branch:

Extension Eager Load Code Call Activate Finish Activate Event By
ms-dotnettools.csharp true 456 2 125 workspaceContains:**/*.{csproj,csx,cake} ms-dotnettools.csharp

What's perhaps more interesting is that "Finish Activate" time was dreadful until I manually deleted my local .razor and .razorDevKit folders. Which I can't really explain, as nothing should have been looking for files in them regardless. Maybe timing on local builds is just flaky.

@dibarbet
Copy link
Member

dibarbet commented Nov 20, 2025

What's perhaps more interesting is that "Finish Activate" time was dreadful until I manually deleted my local .razor and .razorDevKit folders. Which I can't really explain, as nothing should have been looking for files in them regardless. Maybe timing on local builds is just flaky.

interesting! -50ms isn't too bad (still have a lot of O# code). will try it out once we have an official build as well

@phil-allen-msft phil-allen-msft merged commit 9bb8c50 into dotnet:main Nov 20, 2025
33 checks passed
@davidwengier davidwengier deleted the NoHostingLikeCohosting branch November 20, 2025 23:16
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

Successfully merging this pull request may close these issues.

4 participants