PowerShell / PowerShell/PSScriptAnalyzer
PSSA should be crossgen'd
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
Doing some perf tests and there's a large impact to the first time PSSA.dll is loaded due to JIT.
However, after the initial JIT, execution time is MUCH faster. But for cases where PSSA is invoked just once, it's a huge cost without savings as the JIT is only in memory until the process goes away.
These times are for using PSSA recursively against all scripts in PowerShell repo:
| PowerShell | dotnet | cold start (JIT) | warm start |
|---|---|---|---|
| WinPS 5.1 | .Net 4.7.1 | 111s | 18.6s |
| PSCore6 | .NetCore2.1 | 105s | 16.4s |
| PSCore6 | .NetCore2.1+Tiered | 90s | 16.8s |
Tiered is a new opt-in compilation feature of dotnetcore2.1 that balances startup and runtime optimizations.
My conclusion is that we should crossgen (coreclr) and ngen (fullclr) assemblies.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PSSA.dll and the reported CoreCLR crossgen and FullCLR ngen requirements. Reproduce the cold- and warm-start comparison, then verify that the relevant assemblies are precompiled and that the one-time startup cost improves.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- performance, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100