]> cat aescling's git repositories - mastodon.git/commit
Remove sort in Feed (#4050)
authorAkihiko Odaki (@fn_aki@pawoo.net) <akihiko.odaki.4i@stu.hosei.ac.jp>
Mon, 3 Jul 2017 11:17:27 +0000 (20:17 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 3 Jul 2017 11:17:27 +0000 (13:17 +0200)
commitf85dbe83c8e982f9685fbc802031b74c7c319bc7
tree8274ae5461de597c38e1d7faed3a9062e6113d7f
parenta9c326b200247c1dc943c3e2467381772d37bfc8
Remove sort in Feed (#4050)

In from_redis method, statuses retrieved from the database was mapped to
the IDs retrieved from Redis. It was equivalent to order from high to low
because those IDs are sorted in the same order.
Statuses are ordered with the ID by default, so we do not have to reorder.
Sorting statuses in the database is even faster since the IDs are indexed
with B-tree.
app/models/feed.rb
spec/models/feed_spec.rb