Fiendish raises an interesting point in this thread:
http://www.gammon.com.au/forum/?id=10792
Basically timers in MUSHclient won't fire at the advertised time if there is a lot of activity. In particular, ones which have a low interval (eg. 0.5 seconds) might be delayed for a second or two while the client processes incoming text.
This includes the OnPluginTick callback, which is supposed to be called 25 times a second.
This is because the timers are implemented by handling a WM_TIMER event from Windows, and this happens to fire only if there is nothing better to do (except redraw windows, heh).
It seems slightly odd to me that no-one has complained before.
It is probably a simple enough change to make, that (say) before processing text from the MUD that the client manually checks if it is time to check timers.
Advantage
Disadvantages
I am tempted to leave well-enough alone. No-one has complained before (over about 15 years), even Fiendish said at best he would like the documentation updated. Does anyone have any different ideas?
http://www.gammon.com.au/forum/?id=10792
Basically timers in MUSHclient won't fire at the advertised time if there is a lot of activity. In particular, ones which have a low interval (eg. 0.5 seconds) might be delayed for a second or two while the client processes incoming text.
This includes the OnPluginTick callback, which is supposed to be called 25 times a second.
This is because the timers are implemented by handling a WM_TIMER event from Windows, and this happens to fire only if there is nothing better to do (except redraw windows, heh).
It seems slightly odd to me that no-one has complained before.
It is probably a simple enough change to make, that (say) before processing text from the MUD that the client manually checks if it is time to check timers.
Advantage
- Timers would fire closer to the time they should
Disadvantages
- Different behaviour to before, may make things work differently to what you are used to.
- Checking timers every 1/10 of a second in preference to processing incoming messages may make processing of MUD output (which is input to the client) slower.
- Calling OnPluginTick 25 times a second, when there is other stuff to do, like update the output window, process incoming text, handle keystrokes, handle mouse-clicks, might significantly slow down the client (if a plugin is calling that). Conceivably, if the processing in OnPluginTick takes most of the 40 milliseconds that elapse (since there are 40 * 25 milliseconds in a second) the client might become very unresponsive.
I am tempted to leave well-enough alone. No-one has complained before (over about 15 years), even Fiendish said at best he would like the documentation updated. Does anyone have any different ideas?