Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

perf: for .last method delay Array#join operation

#5596

Three performance improvements:

  • for simple cases like User.last and User.order('name desc').last no need to perform Array#join operation.

  • Instead of performing String#blank? do Array#empty?

  • no need to create variable relation

Attached is patch

Reported by Neeraj Singh · September 9th, 2010 @ 09:42 PM

State: committed
Milestone: 3.x
Assigned to: Aaron Patterson Aaron Patterson
Importance: Low

Activity

  1. Neeraj Singh
  2. Aaron Patterson
    Aaron Patterson
    • State changed from new to committed

    Applied, thanks!

    September 27th, 2010 @ 06:51 PM