Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Consider adjusting threshold for showing the load time for personal & system profiles to 1 sec #16929

Copy link
Copy link
@rkeithhill

Description

@rkeithhill
Issue body actions

Summary of the new feature / enhancement

My profile takes ~640 ms to load which is barely noticeable but I get this extra message every single time I start a new session:

image

With the new minimized startup banner in preview.2, can we consider bumping the threshold for showing the timing info on how long it takes to process my profile? Maybe from the current 500 ms to 1 s? It's handy to know if my long startup time is due to my profile but maybe not every time I start a new session. I know my profile takes a bit longer and I'm at peace with that. If only PowerShell wouldn't keep reminding me every time it starts. :-)

Also, I notice that the wall time is noticeably longer than 637ms from seeing PowerShell 7.xx to my prompt appearing. It appears to me to be closer to 1500ms. So the profile loading accounts for less than half the actual startup time. But I get that the only knob the user has to twiddle is what they're doing in their profile.

Proposed technical implementation details (optional)

Option 1: Consider adding a new start up parameter -TimeProfileLoad or something like that. Only when this parameter is specified would you display the profile processing time. In this case, you could also consider being more granular e.g.:

> pwsh -TimeProfileLoad
PowerShell 7.3.0-preview.3
 1100ms : Loading C:\Program Files\PowerShell\7-preview\profile.ps1
  637ms : Loading C:\Users\Keith\Documents\PowerShell\profile.ps1
   75ms : Loading C:\Users\Keith\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
 1812ms : Loading system and personal profiles
 C:\Users\Keith> 

Option 2: Perhaps we just bump the current threshold for displaying the message up to 1 sec.

Option 3: We make the threshold configurable. It defaults to the current 500 ms but folks could adjust that based on their profile. IOW I might want to see this if it is taking longer than normal to process my profile. Where "normal" is what you'd configure for your threshold value.

Reactions are currently unavailable

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.