Comment on [deleted]

<- View Parent
veroxii@aussie.zone ⁨1⁩ ⁨year⁩ ago

How you do it is a hybrid of how you described.

One of the first optimisations the lemmy devs did with the Reddit exodus was to precompute the “hot score” of a post and store it in a field rather than trying to compute it “live” in every query. So the score gets updated every hour and also whenever there is some comment or change to the post.

And the server simply sorts by this value.

There is no reason similar sorting fields can’t be exposed via the API allowing the client (or some client eg with mod access or admin access) to store some arbitrary value to a column and then the server can happily sort by this column.

source
Sort:hotnewtop