-
Notifications
You must be signed in to change notification settings - Fork 33
Repaint Buffer
Executes a single Repaint call if multiple repaint requests are issued by various plugins in rapid succession. Required by included plugins for screen updates. Do not disable or remove this!
Updating the screen in MUSHclient is a tricky art that involves juggling performance concerns with a desire for frequent immediate display refreshes. The problem I tried to address is as follows:
- Calls to Redraw() may not get addressed soon enough due to heavy plugin processing.
- Calls to Repaint() will always get addressed immediately, even if Repaint was already just called a single millisecond before.
- Calls to Repaint() have performance consequences, slowing down the operation of MUSHclient if used too frequently. If a dozen plugins all call Repaint at the same time, the client bogs down unnecessarily.
This is explained in the documentation for Redraw and Repaint...
"Unnecessary calls to Repaint will slow the program down."
"Redraw will cause the window to be redrawn at the next appropriate opportunity. Note that the main window is not actually redrawn at this point, however it is scheduled for redraw next time through the main event loop."
This plugin allows for deferred updates for better performance, like with Redraw, and also the higher priority of Repaint that causes it to happen at all instead of never when under heavy load.
I think so. 😄
Most of the time you don't need to tell MUSHclient to refresh the screen. It will just happen on its own. So first consider carefully whether you need to worry about this at all.
If you're fine with using Redraw() given the described constraints, use that. If you're at all considering using Repaint(), though, do this instead:
BroadcastPlugin(999, "repaint")
Project Details
- Introduction
- Why Should I Use This?
- Installing and Upgrading
- Version Numbering
- Who makes this?
- Mac/Linux/BSD/etc
- License And Other Misc Project Info
Guide/FAQs
- FAQ
- Writing Aliases
- Writing Macros
- Writing Triggers
- Using Variables
- Using GMCP
- Command Line Aliases and Triggers
- Converting Scripts
- GMCP-only Channels
- Miniwindow Basics
- Changing the server address
Featured Components
- ASCII automap
- Text Substitution (sub and gag)
- GMCP driven world mapper
- Communication log window
- Copy with color codes
- Group monitor window
- Health bars
- Stats window
- Bigmap display
- Main output layout
- Automatic update checker
- Miniwindow Color Themes
- Easy DIY Miniwindows
Required Plugins (do not uninstall)
Useful Other Bits