Skip to content

Commit 8aa195d

Browse files
committed
ruby: remove comment (we can create issues)
1 parent 7af8fa7 commit 8aa195d

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

ruby/ql/src/queries/performance/CouldBeHoisted.ql

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88
* @tags performance
99
*/
1010

11-
// Possible Improvements;
12-
// - Consider also Associations.
13-
// Associations are lazy-loading by default, so something like
14-
// in a loop over `article` do
15-
// `article.book`
16-
// if you have 1000 articles it will do a 1000 calls to `book`.
17-
// If you already did `article includes book`, there should be no problem.
18-
// - Consider instances of ActiveRecordInstanceMethodCall, for instance
19-
// calls to `pluck`.
2011
import ruby
2112
private import codeql.ruby.AST
2213
import codeql.ruby.ast.internal.Constant
@@ -87,4 +78,6 @@ where
8778
// Only report calls that are likely to be expensive
8879
call instanceof ActiveRecordModelFinderCall and
8980
not call.getMethodName() in ["new", "create"]
90-
select call, "This call to a database query operation happens inside $@, and could be hoisted to a single call outside the loop.", loop, "this loop"
81+
select call,
82+
"This call to a database query operation happens inside $@, and could be hoisted to a single call outside the loop.",
83+
loop, "this loop"

0 commit comments

Comments
 (0)