this post was submitted on 25 Mar 2025
302 points (98.4% liked)

Announcements

24018 readers
5 users here now

Official announcements from the Lemmy project. Subscribe to this community or add it to your RSS reader in order to be notified about new releases and important updates.

You can also find major news on join-lemmy.org

founded 5 years ago
MODERATORS
 

In the last weeks Lemmy has seen a lot of growth, with thousands of new users. To welcome them we are holding this AMA to answer questions from the community. You can ask about the beginnings of Lemmy, how we see the future of Lemmy, our long-term goals, what makes Lemmy different from Reddit, about internet and social media in general, as well as personal questions.

We'd also like to hear your overall feedback on Lemmy: What are its greatest strengths and weaknesses? How would you improve it? What's something you wish it had? What can our community do to ensure that we keep pulling users away from US tech companies, and into the fediverse?

Lemmy and Reddit may look similar at first glance, but there is a major difference. While Reddit is a corporation with thousands of employees and billionaire investors, Lemmy is nothing but an open source project run by volunteers. It was started in 2019 by @dessalines and @nutomic, turning into a fulltime job since 2020. For our income we are dependent on your donations, so please contribute if you can. We'd like to be able to add more full-time contributors to our co-op.

We will start answering questions from tomorrow (Wednesday). Besides @dessalines and @nutomic, other Lemmy contributors may also chime in to answer questions:

Here are our previous AMAs for those interested.

you are viewing a single comment's thread
view the rest of the comments
[–] Transform2942@lemmy.ml 4 points 6 days ago* (last edited 6 days ago) (2 children)

Good evening Dessalines, I have started looking at the posts query.

The lowest hanging fruit I think would be if we could replace some of the joins with WHERE EXISTS which can have a huge impact on the query time. It seems this is supported in Diesel: https://stackoverflow.com/a/74300447

This is my first time looking at the codebase so I can't tell yet which joins are purely for filtering (in which case they can be replaced by WHERE EXISTS) and which joins need to be left in because some of their columns end up in the final SELECT

I can't tell for sure yet but it also looks like this might also be using LIMIT...OFFSET pagination? That can be a real drag on performance but isn't as easy to fix.

EDIT:

Looking some more, and reading some linked github discussion - I think to really get this out of the performance pits will require some denormalization like a materialized view or manual cache tables populated by triggers. I really like the ranking algorithm but so far I'm finding it difficult to optimize from a query perspective

[–] dessalines@lemmy.ml 2 points 5 days ago (1 children)

This is helpful. Could you make a github issue and copy-paste this there? Thx.

[–] Transform2942@lemmy.ml 3 points 5 days ago (1 children)
[–] Blaze@lemmy.dbzer0.com 2 points 5 days ago (1 children)
[–] ademir 1 points 5 days ago (1 children)

lol! i love your inputs hahaha

[–] Blaze@lemmy.dbzer0.com 2 points 4 days ago (1 children)
[–] ademir 2 points 4 days ago

I love it, thanks!!

[–] Blaze@lemmy.dbzer0.com 2 points 6 days ago

Sounds promising