-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Fix #16929 do not show profile load time msg with new pwsh parameter #17535
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
Fix #16929 do not show profile load time msg with new pwsh parameter #17535
Conversation
This PR adds a new pwsh command line parameter to enable display of the profile load time message.
I believe the original intent of showing the load time was all the complaints from users about how long it was taking PowerShell to startup when most of the time was in their profile. If this is not enabled by default, I can't imagine anyone taking the time to enable this. I wonder if it makes more sense to have this opt-out rather than opt-in? |
@SteveL-MSFT I implemented this based on my interpretation of this WG comment: #16929 (comment) That said, I'm fine with making the default be enabled and having a switch to disable it. But I would like to get @theJasonHelmick's feedback to make sure this is still in line with the thoughts of the WG. |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
FYI I have re-implemented this as an opt-out parameter |
@rkeithhill -- I agree with Steve -- and thank you so much for this work! |
@rkeithhill The Console-Interactive WG reviewed this PR and we agree to have it opt-out rather than opt-in. So, by default, the existing behavior is not changed. Then the ask becomes to have a new switch to hide the profile load time. However, the |
The difference with |
I agree that |
Alright, @rkeithhill can you update this PR then? It's still the |
a193fcd
to
0df6355
Compare
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
One unfortunate consequence of using an opt-out parameter is that it doesn't lend itself to testing. From what I can see, the tests in ConsoleHost.Tests.ps1 all specify starting pwsh with |
BTW I did update this PR to be |
Here's the updated usage:
|
@@ -920,6 +931,11 @@ private void ParseHelper(string[] args) | |||
_sshServerMode = true; | |||
ParametersUsed |= ParameterBitmap.SSHServerMode; | |||
} | |||
else if (MatchSwitch(switchKey, "noprofileloadtime", "noprofileloadtime")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider having -nplt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that. But how about -noplt
so the alias is a bit more consistent with the other -no
aliases: -nol, -nop, -noni
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, when I try that I run smack into this dbg assert:
Dbg.Assert(match.Contains(smallestUnambiguousMatch), "sUM should be a substring of match");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One non-blocking suggestion
🎉 Handy links: |
This PR adds a new pwsh command line parameter to enable the display of the profile load time message.
PR Summary
Changes the host to not display the profile load time by default. A new pwsh command line switch
-ShowProfileLoadTime
was added to allow someone to show the profile load time regardless of the length of the load time.PR Context
Addresses #16929 to further reduce the amount of default startup banner text.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).