microsoft / microsoft/Windows-Driver-Developer-Supplemental-Tools
Improve performance of suppression library
A pull request for this has already been merged.
- #220 by @NateD-MSFT — merged
- Dominant language
- CodeQL
- Stars
- 85
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
The warning suppression library runs extremely slowly. Running in verbose moment with tuple counts, etc. shows most of the time is spent in this function in Suppression.qll (https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/blob/development/src/drivers/libraries/Suppression.qll):
pragma[nomagic]
override predicate appliesToLocation(Location l) {
this.getFile() = l.getFile() and
this.getLocation().getEndLine() <= l.getStartLine() and
// If we're in a pragma push/pop, ensure the disable is too
(
exists(SuppressionPushPopSegment spps |
spps.getADisablePragma() = this and
spps.isInPushPopSegment(l)
)
or
not exists(SuppressionPushPopSegment spps | spps.getADisablePragma() = this) and
not exists(SuppressionPushPopSegment spps | spps.isInPushPopSegment(l))
)
}
}
This blocks #100 .
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/drivers/libraries/Suppression.qll at the appliesToLocation predicate and review the linked pull request #220 for the work already completed. Compare the reported verbose-mode performance and tuple counts with the current implementation; done means the suppression library no longer exhibits the reported slowdown.
Written by the indexing model from the issue text.
Assessment
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100