-
Notifications
You must be signed in to change notification settings - Fork 394
Improve performance script analyzer #247
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
Conversation
Dictionary<string, List<RuleSuppression>> ruleSuppressions; | ||
List<Regex> includeRegexList; | ||
List<Regex> excludeRegexList; | ||
CountdownEvent cde; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to initialize an initial count ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh i don't need that countdownevent actually. Forgot to remove it. Updated!
Otherwise, looks good to me. |
Quoc. Can you summarize the changes here? Need this for the release notes |
suppressed.AddRange(records.Item1); | ||
List<object> result = new List<object>(); | ||
|
||
//WriteVerbose(string.Format(CultureInfo.CurrentCulture, Strings.VerboseRunningMessage, scriptRule.GetName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
Improve the performance of PSScriptAnalyzer by running the default rules in parallel using System.Threading.Task. It is important to note that any rules that use powershell.invoke cannot be run in parallel using this method (hence why we only apply it to the default rules). |
looks good. Do you know how long the test pass takes with/without the changes? |
It's only 2 or 3 seconds faster because the tests run small scripts (which means that the improvement from running the rules in parallel won't be noticeable). If you run this with the DoPx module of Kirk for example, then it is almost twice as fast (same if we run on a long script like PSGet.psm1 where it can be 3 or even 4 times faster). |
Merged the changes. |
Improve performance script analyzer
No description provided.