For clients maybe not, but for servers the protocol itself is to blame, yes. A giant distributed graph database where everything has to be synced constantly means you use a ton of memory. IRC is definitely complicated, and arguably a pile of hacks, but an event based system (more or less) makes a lot more sense for chat where you want realtime communication (more or less), not to wait while you sync nodes in the graph to every place that wants them.
This makes no sense. Propagating a bunch of messages doesn't suddenly use a ton of memory just because you're organizing them as a graph rather than a linear pubsub-style stream.
Sorry, it was a bad explanation. The point is that you have to keep a lot of past state in memory for future messages to make sense and sync properly, unlike an event based system where you (more or less) only need to perform some action when you get an event then forget about it. This is an IRC thread though, sorry I got sucked in but let's not let the Matrix CEO derail it and try to score users. The whole point is is that it didn't make sense for them to switch to matrix because it uses more resources than most IRC servers and because they are trying to be a drop in replacement, not make users sign up for new things.
You don't have to keep that much state in memory at all, actually. I'm not sure why you think that you do.
Most of the state resolution (eg. the auth chain) involves calculations of which you can cache the result without needing to care about the inputs beyond that - at least, unless you need to recalculate them once later if delayed events come in.
Ultimately, the performance problems that Synapse has are problems with Synapse's implementation choices (especially around the database schema), not with the protocol nor with the state resolution algorithm.
Re:Welcome to Libera Chat
by TheCycoONE on Wednesday May 19, 2021 @08:29PM
(#27216057)
Presence may be a protocol level issue. My server struggled pretty badly until I disabled it and I see that's generally the advice: https://github.com/matrix-org/synapse/issues/3971
That doesn't seem like a fundamental issue though.
In which way does the protocol make no sense for chat? IRC is extremely complicated as well and a giant pile of hacks.