Vote #80842
完了Use more efficient "exists?" instead of "first" in tests when checking the existence of rows
開始日:
2022/05/09
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
30
version_id:
152
issue_org_id:
33367
author_id:
332
assigned_to_id:
332
comments:
3
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
When you check if any row exists, using @exists?@ that does not return ActiveRecord objects is more efficient than using @first@.
The attached patch replaces @first@ with @exists?@.
journals
--------------------------------------------------------------------------------
Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------
Admin Redmine さんが3年以上前に更新
- カテゴリ を Code cleanup/refactoring_30 にセット
- 対象バージョン を 4.2.0_152 にセット
いいね!0