Name |
Last commit
|
Last update |
---|---|---|
.. | ||
at_user_observer_spec.rb | ||
comment_spec.rb | ||
comment_thread_spec.rb | ||
user_spec.rb |
Use pluck instead of map for upvoted/downvoted IDs. Mapping involves doing the projection locally, whereas plucking will ask MongoDB to do the projection for us. This is the difference between sending the whole document back and sending back the ObjectId itself. Multipled against hundreds or thousands of documents, mapping can really add up, so plucking should really help these 99%'ile cases.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
at_user_observer_spec.rb | Loading commit data... | |
comment_spec.rb | Loading commit data... | |
comment_thread_spec.rb | Loading commit data... | |
user_spec.rb | Loading commit data... |