This knowledge base article briefly covers why Textual might use a lot of memory and some steps that can be taken to make it use less memory.
Textual has been optimized to use the least amount of memory possible. It does not retain information in memory for more than a few seconds unless absolutely necessary.
So then why does it use so much memory? Because of customizability.
WebKit is used by Textual to make it easy for everyday users to style the app. An unfortunate side effect of using WebKit is that it can use a fair amount of memory for users that are in a large number of channels.
If this is such a problem, then why not stop using WebKit? Doing so would throw customizability out of the window. Styles would be limited to very basic changes, such as changing the color of text. They would no longer be able to create unique, rich, interactive designs that users have come to enjoy.
One way to reduce memory use is to leave channels that you do not view often.
Another way is to reduce the number of messages that are visible in each channel.
To change the number of visible messages, follow the steps presented below: