From f1e9f0e323cf070dd20e3457ec6dc5d2d5bcdc3c Mon Sep 17 00:00:00 2001 From: Jonas Jensen Date: Wed, 9 Jul 2025 09:24:26 +0200 Subject: [PATCH] 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. --- shared/util/codeql/util/AlertFiltering.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/util/codeql/util/AlertFiltering.qll b/shared/util/codeql/util/AlertFiltering.qll index 091c2a89d00..4064e4f31a8 100644 --- a/shared/util/codeql/util/AlertFiltering.qll +++ b/shared/util/codeql/util/AlertFiltering.qll @@ -98,7 +98,7 @@ module AlertFilteringImpl { exists(int locStartLine, int locEndLine | location.hasLocationInfo(filePath, locStartLine, _, locEndLine, _) | - restrictAlertsToStartLine(filePath, [locStartLine .. locEndLine]) + restrictAlertsToStartLine(pragma[only_bind_into](filePath), [locStartLine .. locEndLine]) ) ) or