-
Notifications
You must be signed in to change notification settings - Fork 43
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule 20.12: Improve performance #241
Conversation
This commit optimizes the from-where-select clause of this query, which was highlighted as one of the slowest predicates for our C query suites. This commit makes the following changes: * Avoid repetition of `m.getParameter(i)`, which caused a cross product * Change the way we identify "further expanded macro" * Modify the isExcluded predicate to reference the macro invocation not the macro.
馃 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results. |
馃 Beep Boop! gcc/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!
|
馃 Beep Boop! clang/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test! |
馃 Beep Boop! gcc/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test! |
馃 Beep Boop! clang/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!
|
馃 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing! |
Updated the issue body - I meant that the poor performance was not related to the upgrade! |
Description
This commit optimizes the from-where-select clause of this query, which was highlighted as one of the slowest predicates for our C query suites.
This commit makes the following changes:
m.getParameter(i)
, which caused a cross productisExcluded
predicate to reference the macro invocation not the macro.@rvermeulen I think you wrote this rule originally, so I would appreciate a review. In particular, the change from
to
Achieves what you originally intended.
@mbaluda @jsinglet this addresses one of the slowest performing predicates that was highlighted in #226, although the slow performance is not related to the upgrade itself.
Change request type
.ql
,.qll
,.qls
or unit tests)Rules with added or modified queries
Rule 20.12
Release change checklist
A change note (development_handbook.md#change-notes) is required for any pull request which modifies:
If you are only adding new rule queries, a change note is not required.
Author: Is a change note required?
馃毃馃毃馃毃
Reviewer: Confirm that format of shared queries (not the .qll file, the .ql file that imports it) is valid by running them within VS Code.
Reviewer: Confirm that either a change note is not required or the change note is required and has been added.
Query development review checklist
For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:
Author
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
Reviewer
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.