Skip to content

Improve performance script analyzer - #247

Merged
Quoc Truong (quoctruong) merged 8 commits into
BugFixesfrom
ImprovePerformanceScriptAnalyzer
Jun 18, 2015
Merged

Quoc Truong (quoctruong) merged 8 commits into
BugFixesfrom
ImprovePerformanceScriptAnalyzer

Conversation

@quoctruong

Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Contributor

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 ?

Copy link
Copy Markdown
Author

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!

@yutingc

Copy link
Copy Markdown
Contributor

Otherwise, looks good to me.

@raghushantha

Copy link
Copy Markdown
Member

Quoc. Can you summarize the changes here? Need this for the release notes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove commented code

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed.

@quoctruong

Copy link
Copy Markdown
Author

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).

@raghushantha

Copy link
Copy Markdown
Member

looks good. Do you know how long the test pass takes with/without the changes?

@quoctruong

Copy link
Copy Markdown
Author

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).

@quoctruong

Copy link
Copy Markdown
Author

Merged the changes.

Quoc Truong (quoctruong) pushed a commit that referenced this pull request Jun 18, 2015
@quoctruong
Quoc Truong (quoctruong) merged commit dc59597 into BugFixes Jun 18, 2015
@quoctruong
Quoc Truong (quoctruong) deleted the ImprovePerformanceScriptAnalyzer branch June 18, 2015 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants