Chat Scrubber - Keep Chat Log to a Minimum (improves peformance)
Problem: I am experiencing a severe load/freezing issue in V10 with a heavily modded, heavy CSS PF2 system where the Chat log will take 2-8 seconds to redraw upon returning to it from any other sidebar tab (ex: Combat, or Actors), as well as 2-8 seconds of freezing when players generate a new message. Players do not experience this since their posts are limited in info and complexity, but as a DM this destroys my pacing. The freezing will result in the browser or Electron server displaying the “want to kill this application due to unresponsiveness” dialog if clicked multiple times during the freeze, but it will unfreeze on its own. The issue was identified as the chat log, which appears when the chatlog fills in with 40-50+ very complex system messages (attacks, damage rolls) in the PF2 system. Not a mod conflict: tested with zero mods with and without Dorako UI. With Dorako UI the problem is considerably worsened, but I want to keep using this mod. The only solution I could find for the problem is regularly cleaning the chat log, but I want to automate this, so I don’t have to do it manually when I start experiencing slowdowns. This mod would help me with it.
Settings
- Maximum Chat to Retain [default: 50]
- Exclude Message Chats [default: on]
- Maximum Chat to Reload [default: 10]
Functionality
- The mod scans the chat every X seconds on every chat message generated and deletes any messages in the Chat Log older than the most recent X [default: 50].
- If Exclude Message Chats is on, exclude chats that are messages or whispers from players or DM.
- When the user switches to another tab in the sidebar and returns to chat, behavior separate from loading the chat after world load or F5 refresh only renders a few messages (default: 10). The rest will only load in the chat if the user scrolls up and browses to the top of the list, in batches of 10. The code for this may be found in DF Chat Enhancements, but I could not hack the mod to limit the minimum batch of 100 messages to a limit of 10.
Any tricks that could help speed up rendering chat would be welcome and can expand the budget of the mod.
Budget : 50$
16 Replies
Taken by @Magus! Thanks for the very quick response.
@Apostol Apostolov gave :vote: LeaguePoints™ to @Magus (#118 • 11)
Exclude Message Chats
Im having some confusion on this setting
Its meant to only toggle whispers deletion?
Or does it control wether the first setting is active or not?
@Magus It excludes chat messages that are whispers or speech from GM and players
the first setting is always active when set to a value, but excluding speech and whispers guarantees it won't remove single small messages from DM that may be important to game.
"from GM and players".. so any whisper or speech?
any whisper and speech, yes
there are no messages wich are not from GM or players
so it should scrub attacks, damages, spells, items, etc.
but if the GM posts the exact name of a character, it won't get scrubbed if the second setting is on
Im gonnah ave to investigate the best way to address this because the game doesnt really differentiate those messages
an attack message is just the same as any message
if this cannot be done immediately, this is a nice to have, not a must-have.
Well, if the message has a roll in it, maybe I can treat it as a 'non important message'
btw i will check if the messages have special css in PF2
jut to clarify the game breaking issue is most prevalent in PF2
so it is the focus of this mod, though agnostic in general
so let me see if I can give you useful CSS
The only thing I found is
Normal chat messages content is
Chat cards (all other content) has a nested chat-card class
Dont worry about it I will investigate the best way
GitHub
GitHub - elizeuangelo/fvtt-module-chat-cleaner
Contribute to elizeuangelo/fvtt-module-chat-cleaner development by creating an account on GitHub.
Many thanks to @Magus for saving my games with this excellent mod, it helps people with lower memory handle chat log without suffering too many freezes or slowdowns.
@Apostol Apostolov gave :vote: LeaguePoints™ to @Magus (#109 • 12)