Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Add config option to limit history size #527

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add config option to limit history size #527

wants to merge 2 commits into from

Conversation

maxpoulin64
Copy link

This adds a (temporary?) config option to limit the amount of messages stored per channel to avoid the server's memory usage to grow as channels fills up with messages.

  • It defaults to 0 so the regular behavior of infinite history is kept, but users can set a size limit to avoid their server from running out of memory over time.
  • It just splices out the older messages from the array, first in first out.
  • I don't know how efficient node is at handling splicing, but it might possibly be expensive if the number of history lines is high enough.

This adds a (temporary?) config option to limit the amount of messages stored per channel to avoid the server's memory usage to grow as channels fills up with messages.
@floogulinc
Copy link
Collaborator

There is something similar in #391 that also can load from the log file if enabled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants