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

Remove RegisterWithDotnetSuggest #2099

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

adamsitnik
Copy link
Member

  • remove StringBuilderPool, it's a performance anti-pattern in case of S.CL because it was almost always used only once per process lifetime. We were paying for the pool creation but not taking any benefits from having it.
  • remove RegisterWithDotnetSuggest, it's too expensive to start a new process for every app by default (even just once)

For now those who want to use dotnet-suggest they need to simply register their apps in explicit way by calling a dedicated command for that:

dotnet-suggest register --command-path $pathToYourApp

This should be done as part of the app installation.

In the future we are most likely going to improve this process, but we need to have a discussion with @jonsequitur and @SteveL-MSFT about it.

cc @MichalStrehovsky who "loved" this feature and "promoted" in on Twitter multiple times

…S.CL because it's most likely used once per process lifetime and it's just cheaper to create StringBuilder
…rocess for every app by default (even just once)
@adamsitnik adamsitnik merged commit 3b5c4be into dotnet:main Mar 16, 2023
@adamsitnik adamsitnik deleted the removeMiddlewareAndHosting branch March 16, 2023 15:55
@MichalStrehovsky
Copy link
Member

cc @MichalStrehovsky who "loved" this feature and "promoted" in on Twitter multiple times

† only once. I have a notepad.exe renamed to dotnet-suggest.exe on my system PATH and see a random notepad popping up from time to time. I'll miss the charm.

@adamsitnik
Copy link
Member Author

@MichalStrehovsky Apologies, my memory served me wrong. Anyway the problem is gone.

BTW I wanted to spend some time looking at size of a published NativeAOT app that uses System.CommandLine. Is there a doc that explains how to track code that "roots" other code and how big it is? I am basically hoping to do something similar to memory leak analysis, but for code (identify roots, sort by size, fix).

@MichalStrehovsky
Copy link
Member

Awesome! There are some notes scattered around on how to troubleshoot size. E.g. here: dotnet/runtime#78671 or here: dotnet/corert#7962.

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.

3 participants