| Message |
This has been discussed at some length here:
http://www.gammon.com.au/forum/?id=6023
Your thread description says "as of v4.22" - does that mean it was less noticeable in an earlier version? If so, which version? If you revert to the earlier version (but don't change anything else, if possible) does the problem go away?
There is a known problem, which is unresolved so far, that if you have:
- A trigger/timer/alias that is called frequently
- It does "send to script" (rather than calling a script function in a separate script file)
- It uses a script language other than Lua
... this seems to cause gradual memory leaks.
When you use "send to script" the script engine is called to "compile" and then "execute" your script (each time). It appears that calling the compile phase frequently is somehow to blame. If you use a script file this is only compiled once, and thus any leaks are minimized.
Lua is implemented differently internally (it doesn't use the Windows Script Interface) and does not have this problem.
The problem would also apply to any plugins you have installed that meet that criteria.
It is likely to be particularly noticeable if you do something very frequently, for example a trigger that matches every line (eg. to log each line).
MUSHclient is Open Source, and if anyone can see the problem in the "send to script" part they are welcome to let me know.
As a workaround, I suggest doing one of these:
- Change from "send to script" to using a script file, and calling functions in the script file. In many cases this is a simple change, the hardest part being revamping how wildcards are processed.
For example, instead of using %1 as the first wildcard in "send to script", in the script file you need to use wildcards [1] - or whatever the exact syntax is for your language.
- Rewrite to use Lua scripting. This lets you keep "send to script" but means learning a new script language, and implementing it.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|