Skip to content

Commit f1e9f0e

Browse files
committed
Shared: improve join order in filterByLocation
It's better to join with the range expression first since that will only multiply tuple counts by the number of lines in an average source/sink. Joining with `restrictAlertsToStartLine` first would multiply tuple counts by the number of sources/sinks in a given file.
1 parent bb45d06 commit f1e9f0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared/util/codeql/util/AlertFiltering.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ module AlertFilteringImpl<LocationSig Location> {
9898
exists(int locStartLine, int locEndLine |
9999
location.hasLocationInfo(filePath, locStartLine, _, locEndLine, _)
100100
|
101-
restrictAlertsToStartLine(filePath, [locStartLine .. locEndLine])
101+
restrictAlertsToStartLine(pragma[only_bind_into](filePath), [locStartLine .. locEndLine])
102102
)
103103
)
104104
or

0 commit comments

Comments
 (0)