mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Improve performance of #uniq across a large number of nodes
This commit is contained in:
parent
4524c7f8a8
commit
707554e6a8
1 changed files with 4 additions and 1 deletions
|
@ -124,7 +124,10 @@ Arel 4.0.0 with no replacement. PEW PEW PEW!!!
|
|||
end
|
||||
|
||||
def hash
|
||||
[@name, @engine, @aliases, @table_alias].hash
|
||||
# Perf note: aliases, table alias and engine is excluded from the hash
|
||||
# aliases can have a loop back to this table breaking hashes in parent
|
||||
# relations, for the vast majority of cases @name is unique to a query
|
||||
@name.hash
|
||||
end
|
||||
|
||||
def eql? other
|
||||
|
|
Loading…
Reference in a new issue