]> source.dussan.org Git - redmine.git/commitdiff
Added an optimization note for later.
authorEric Davis <edavis@littlestreamsoftware.com>
Sun, 20 Dec 2009 19:13:27 +0000 (19:13 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sun, 20 Dec 2009 19:13:27 +0000 (19:13 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3207 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/query.rb

index 2e1680a9d69ab975b12883225a3b459bc30a27e3..afbb687728565c08b2061ed2416f2898f5b2a563 100644 (file)
@@ -186,6 +186,7 @@ class Query < ActiveRecord::Base
       user_values += project.users.sort.collect{|s| [s.name, s.id.to_s] }
     else
       # members of the user's projects
+      # OPTIMIZE: Is selecting from users per project (N+1)
       user_values += User.current.projects.collect(&:users).flatten.uniq.sort.collect{|s| [s.name, s.id.to_s] }
     end
     @available_filters["assigned_to_id"] = { :type => :list_optional, :order => 4, :values => user_values } unless user_values.empty?