Lax icon indicating copy to clipboard operation
Lax copied to clipboard

move old messages out of memory

Open brandly opened this issue 7 years ago • 2 comments

this thing will just keep sucking up messages and eating up memory as long as you leave it open. it also gets increasingly stressful for react to render larger conversations. (improving MessageList rendering significantly improved react performance, but switching to a long conversation still hangs slightly)

in the short term, it'd be easy to cap messages per convo and just forget about old messages.

eventually, it'd be nice if this cached old messages to disk. we'd have to coordinate reading them in as you scrolled and such, which would take some work. rejoining a channel and seeing messages from when you were last online would be cool tho

brandly avatar Feb 16 '18 19:02 brandly

electron.session could come handy here to cache the electron.WebContents process from our renderer processes

Fohlen avatar Mar 11 '18 14:03 Fohlen

just in case anyone comes across this, i think the most pressing issue here is that switching channels lags a bit when a lot of messages have built up. i think a virtualized list would solve this, but i haven't experimented yet. this seems to be the component everyone uses!

brandly avatar Jun 05 '20 15:06 brandly