Actions
Patch #21582
closedPerformance in User#roles_for_project
Start date:
Due date:
% Done:
0%
Estimated time:
Description
roles are duplicating a scope not an result, thus every hit produce a query, cached, but it is still not desired.
Files
Updated by Go MAEDA almost 9 years ago
- Target version set to 3.3.0
I think we can remove the last 'dup' method from Ondřej Ezr's patch because ActiveRecord::Associations::CollectionProxy#to_a returns copied objects.
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 943
def to_ary
load_target.dup
end
Updated by Ondřej Ezr almost 9 years ago
true, I just put to_a there with heureka feeling, but you are right dup is meaningless now :)
Updated by Jean-Philippe Lang almost 9 years ago
- Subject changed from Performance in roles to Performance in User#roles_for_project
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
Committed, thanks.
Actions