this post was submitted on 04 Jul 2023
5 points (100.0% liked)
Lemmy Server Performance
6 readers
1 users here now
Lemmy Server Performance
lemmy_server uses the Diesel ORM that automatically generates SQL statements. There are serious performance problems in June and July 2023 preventing Lemmy from scaling. Topics include caching, PostgreSQL extensions for troubleshooting, Client/Server Code/SQL Data/server operator apps/sever operator API (performance and storage monitoring), etc.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I have no idea why the file is named "mod.rs", as normal non-admin non-moderator users seem to go through this code path.
this is a rust thing: https://stackoverflow.com/questions/26435102/in-rust-what-is-the-purpose-of-a-mod-rs-file
ok, I figured out how to get Rust to match the enum, is there a way to do this with match instead of if statements?
Code seems to work great, blocks UndoVote/Vote but does the send on comment reply.
more "correct" way would be this:
here it is in the rust book: https://doc.rust-lang.org/stable/book/ch06-02-match.html
ool. I found the syntax for multiple hits, so I was looking for:
Thank you.