Skip to content

Commit 50c2ff7

Browse files
committed
ruby: add comment from triage session
1 parent 2406e04 commit 50c2ff7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ruby/ql/src/queries/performance/CouldBeAsync.ql

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

11+
// Consider also Associations.
12+
// Associations are lazy-loading by default, so something like
13+
// in a loop over article do
14+
// article.book
15+
// if you have 1000 articles it will do a 1000 calls to book.
16+
// If you already did article includes book, there should be no problem.
1117
import ruby
1218
private import codeql.ruby.AST
1319
import codeql.ruby.Concepts

0 commit comments

Comments
 (0)