lib/picky/query/allocations.rb in picky-4.6.0 vs lib/picky/query/allocations.rb in picky-4.6.1

- old
+ new

@@ -102,17 +102,15 @@ # included if it contains no ids (even in case they have been # eliminated by the unique constraint in this method). # # Note: Slower than #process! especially with large offsets. # - # TODO Remove duplicate code. - # def process_unique! amount, offset = 0, terminate_early = nil unique_ids = [] each do |allocation| calculated_ids = allocation.process_with_illegals! amount, 0, unique_ids projected_offset = offset - allocation.count - unique_ids += calculated_ids # TODO uniq this? + unique_ids += calculated_ids # uniq this? <- No, slower than just leaving duplicates. if projected_offset <= 0 allocation.ids.slice!(0, offset) end offset = projected_offset unless calculated_ids.empty? \ No newline at end of file