Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-Formatter: Skip VariableAnalysis, which is not used by Formatter rules - this yields a 25% performance improvement #1451

Conversation

bergmeister
Copy link
Collaborator

@bergmeister bergmeister commented Apr 18, 2020

PR Summary

Formatter rules do not call APIs from VariableAnalysis, therefore skipping its initialization makes formatting much faster.
For PowerShell's 3000 line build.psm1 file, this changes execution time from 2 seconds to 1.5 seconds.

PR Checklist

@bergmeister bergmeister changed the title Invoke-Formatter: Skip VariableAnalysis, which is not used by Formatter rules - this yields a 25%-50% performance improvement Invoke-Formatter: Skip VariableAnalysis, which is not used by Formatter rules - this yields a 25% performance improvement Apr 19, 2020
@JamesWTruher JamesWTruher merged commit bd5a4b1 into PowerShell:master Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants