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: |
| _sshServerMode = true; | ||
| ParametersUsed |= ParameterBitmap.SSHServerMode; | ||
| } | ||
| else if (MatchSwitch(switchKey, "noprofileloadtime", "noprofileloadtime")) |
There was a problem hiding this comment.
Should we consider having -nplt?
There was a problem hiding this comment.
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.
Nevermind, when I try that I run smack into this dbg assert:
Dbg.Assert(match.Contains(smallestUnambiguousMatch), "sUM should be a substring of match");
SteveL-MSFT
left a comment
There was a problem hiding this comment.
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
-ShowProfileLoadTimewas 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,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).