Skip to content

Update folder path for storing optimization profile and add test to validate loaded assemblies and libraries on startup - #8406

Merged
Dongbo Wang (daxian-dbw) merged 7 commits into
PowerShell:masterfrom
daxian-dbw:SteveL-MSFT-startup-test
Dec 6, 2018
Merged

Update folder path for storing optimization profile and add test to validate loaded assemblies and libraries on startup#8406
Dongbo Wang (daxian-dbw) merged 7 commits into
PowerShell:masterfrom
daxian-dbw:SteveL-MSFT-startup-test

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Dec 6, 2018

Copy link
Copy Markdown
Member

PR Summary

Two changes in this PR:

  • Update folder path for storing optimization profile
  • Add test to validate loaded assemblies and libraries on startup

Assemblies loaded on startup impact startup time. Sometimes we merge a commit that uses a new type that adds loading a new assembly on startup. We need to catch these and decide if it's worth the impact or delay loading when possible.

Assemblies that are loaded during startup are affected by the profile optimization automatically generated in powershell. The StartupProfileData-xxxx files record assemblies that are potentially used right after powershell starts. With such a file being available, powershell will eagerly load those assemblies using multiple CPU cores, even though some assemblies are not really needed for the current use case.

So, to accurately test the loaded assemblies at startup, we need to remove StartupProfileData-NonInteractive before run pwsh -noprofile -command ...

PR Checklist

Comment thread test/powershell/Host/Startup.Tests.ps1 Outdated
@adityapatwardhan

Copy link
Copy Markdown
Member

Steve Lee (@SteveL-MSFT) Please update your review.

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 2dcf52f into PowerShell:master Dec 6, 2018
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the SteveL-MSFT-startup-test branch December 6, 2018 22:26
@daxian-dbw Dongbo Wang (daxian-dbw) added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Dec 6, 2018
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
…alidate loaded assemblies and libraries on startup (PowerShell#8406)

- Update folder path for storing optimization profile file.
- Add test to validate loaded assemblies and libraries on startup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants