Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
"eql?" performance issue / rails url helper #65
I recently noticed some rails url helpers to be exceptionally slow (120ms in some cases) and tracked it down to the use of "eql?" on couch_potato models. For some reason a standard book_path(book) results in a book.eql?(book) call, resulting in 2 to_json calls on the book (which is no problem for other ORM/ODMs).
Is there any reason to do content comparisons there? ActiveRecord, mongoid etc. all do id comparisons only and as there is no test for content equality in couch_potato, I would assume it's not needed here too?
I'll do a pull request later, but wanted to know if there is or was a reason for the content comparison.