Skip to content

Does PSStyle early initialization less expensive#16320

Merged
daxian-dbw merged 2 commits intoPowerShell:masterfrom
iSazonov:perf-init-psstyle
Oct 28, 2021
Merged

Does PSStyle early initialization less expensive#16320
daxian-dbw merged 2 commits intoPowerShell:masterfrom
iSazonov:perf-init-psstyle

Conversation

@iSazonov
Copy link
Copy Markdown
Collaborator

@iSazonov iSazonov commented Oct 28, 2021

PR Summary

Improve startup scenario. It is a perf regression after #13758.

Before the PR:
image

PR Context

PR Checklist

@iSazonov iSazonov added the CL-Performance Indicates that a PR should be marked as a performance improvement in the Change Log label Oct 28, 2021
@iSazonov iSazonov marked this pull request as ready for review October 28, 2021 06:41
Copy link
Copy Markdown
Member

@daxian-dbw daxian-dbw left a comment

Choose a reason for hiding this comment

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

LGTM, with a couple feedback.

It is a perf regression after #15897.

Are you sure it's regressed by #15897? That PR doesn't seem to be related. Please update your PR description if that should be corrected.

Comment thread src/System.Management.Automation/FormatAndOutput/common/PSStyle.cs Outdated
Comment thread src/System.Management.Automation/FormatAndOutput/common/PSStyle.cs
@iSazonov
Copy link
Copy Markdown
Collaborator Author

It is a perf regression after #15897.

Are you sure it's regressed by #15897? That PR doesn't seem to be related. Please update your PR description if that should be corrected.

There was added static InitialSessionState() constructor. But the PRStile variable initialization was added early in #13758. I updated the PR description. Thanks for pointing this!

@daxian-dbw daxian-dbw merged commit 48be7b7 into PowerShell:master Oct 28, 2021
@iSazonov iSazonov deleted the perf-init-psstyle branch October 29, 2021 02:51
@ghost
Copy link
Copy Markdown

ghost commented Dec 16, 2021

🎉v7.3.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Performance Indicates that a PR should be marked as a performance improvement in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants