- Notifications
You must be signed in to change notification settings - Fork70
IOFStreamMissingPositioning: Improve performance#860
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
oppositeDirection was a performance problem, because it was notrestricted to read write calls with the same source.
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.
PR Overview
This pull request addresses performance issues in specific query files by restricting contextual evaluations to only read/write calls with the same source. The changes include updates to multiple queries and corresponding change notes to document the performance improvements.
- Modified query metadata for rules A27-0-3, FIO309-C, FIO50-CPP, and RULE-30-0-2.
- Added a change note to capture the reduced evaluation time on complex codebases.
Changes
| File | Description |
|---|---|
| change_notes/2025-02-17-iofstream-performance.md | Added change note for performance improvements in interleaved I/O query evaluations |
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
change_notes/2025-02-17-iofstream-performance.md:1
- There is a missing comma between
FIO309-CandFIO50-CPPin the list of modified rules. Please insert a comma for clarity.
- `A27-0-3`, `FIO309-C` `FIO50-CPP`, `RULE-30-0-2` - `InterleavedInputOutputWithoutFlush.ql`, `DoNotAlternatelyIOFromStreamWithoutPositioning.ql`,`InterleavedInputOutputWithoutPosition.ql`, `ReadsAndWritesOnStreamNotSeparatedByPositioning.ql`:Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality.Learn more
Uh oh!
There was an error while loading.Please reload this page.
knewbury01 left a comment
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.
other than that tiny format suggestion on the change note, this looks just fine to me
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
7317d11Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Description
oppositeDirection/sameDirectioncould be a performance problem on large codebases, because they were not restricted to read/write calls with the same source. We apply abindingSetto ensure we only calculate it within a specified context.For testing,
microsoft/onnxruntimeshows a the speed up before/after.Change request type
.ql,.qll,.qlsor unit tests)Rules with added or modified queries
A27-0-3FIO309-CFIO50-CPPRULE-30-0-2Release 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 ofshared 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.