@p@lain@graf@mint@Moon Pleroma is I/O bound partially because it was written in a language specifically designed to be incredibly slow and wasteful when it comes to reuse of memory.
It cannot be repeated enough. Functional programming languages are totally orthogonal to how computers actually work and you can never take advantage of the properties of a computer if you view how a computer actually operates as a flaw that requires a rube goldberg machine to pretend doesn't exist. But of course, never will cease to exist because ultimately you are trying to get a computer to do a thing, not just turn on and get warm (as the intended purpose of functional programming languages).
@loathsome@p@lain@graf@mint@Moon there's two answers to this. The real world answer and the academic answer. In the real world the idea of copying large arrays over and over instead of using state and mutability is totally orthogonal to writing performant code.
@p@lain@graf@mint@Moon security isn't the reason I want it rewritten in Rust. It's because I refuse to learn Elixir and fundamentally speaking it will always be inferior to a non-VM, non-GC'd language.
Mitra has the right idea just going ahead and using Actix. Actix/Tokio will absolutely annihilate whatever routing framework Pleroma uses (Phoenix?) .
@alex@lain@graf@n-2-l@mint@Moon almost everything I run is never CPU bottlenecked, and that's a bad thing. They're always IO bottlenecked, pleroma, matrix, everything. The CPU is literally just sleeping while waiting for data to move from disk to ram to CPU. If the software was good that data would be in CPU cache, it would be in memory, it wouldn't be on disk. It wouldn't be constantly doing system calls to the kernel and sleeping on mutexes.
If the software was good, it'd be using 100% on all cores.
@alex@lain@graf@n-2-l@mint@Moon Pleroma doesn't cache enough. Like I said the bottleneck is IO. I struggle to get it to use more memory, I tune all the lame VM options and yet it never really caches more. Meanwhile as a functional GC'd VM language Elixir is constantly allocating and throwing away memory. Even Rust isn't perfect since it tends to promote RAII which involves allocating and throwing away memory.
One of the architectural decisions I did in sneedforo was to cache as much data as reasonable in memory. Avoiding queries to the DB. Imagine the insane performance gains Pleroma could have if it actually cached stuff in an intelligent way. Oh, but that's a little complicated, right? What is the states become stale, that could be a problem. Bro, just don't be a soydev and think about it hard.
@alex@lain@graf@n-2-l@mint@Moon Pleroma needs to talk to the DB less. While faster DBs are a nice idea, they will always been significantly slower than retrieving from local process memory. It's not just the overhead of (de)serialization, DBs must be hyper-generic and account for all possible scenarios. The reality is you can make reasonable assumptions about your data and those reasonable assumptions unlock worlds of optimizations.
@mint@alex@lain@graf lmao "displaying images on a website is too complicated and it keeps injecting javascript so just host all your images on a different domain instead".
I wrote my own MIME detection crap in Rust in a few hours, optional ffmpeg integration for codec detection. Apparently no Elixir dev can do this.
@Moon@alex@lain@graf@mint I don't care this is insane. No one is saying move UGC text to a different domain. No, it's the _SAFE_ stuff that should be moved to a different domain. Images are literally the easy part, sanitizing text is the hard part but it's a solved problem if you use someone else's library.
I'm tired of seeing webshitters pretend like they're real devs while working in soy languages with soy frameworks and in the end they're very proud of themselves for displaying text and images on a webpage poorly, in under 4GB of per-tab RAM usage.
Take your L and don't tell me to move shit to a different domain. Don't pretend like you wrote this down anywhere in the docs, because you didn't, no, it's just retroactive cope.
@mono I wont be surprised that in X years from now she says "my husband video raped me when I was sick and vulnerable". It's just such bizarre behavior. I've been pretty brutally sick before, the idea of showing the "brutal reality" of how fuck much of a invalid sack of shit you are is basically cringe, it's like watching someone go poo.
Normally when people get brutally injured you see them smiling and giving thumbs up in rehab or whatever, not the moments they're breaking down and crying. I don't think that's forced, I think that's how normal people handle it.
That reminds me of the dude who lost his entire lower torso, and his girlfriend posted a video of him having a breakdown while all his own social media was upbeat.
LOOK AT MY SACK OF SHIT WIFE SHE IS ABSOLUTELY CRIPPLED. I wonder what she's listening to, probably sissy hypno mixed in with episodes of The Right Stuff (she's a paypiggy).