At least that's what I think the problem is. In my Paste_As_MUSH plugin, since I converted it to Lua, I just tried encoding something and it ran somewhat slow. I believe it's due to the fact that it goes through each character and appends an escaped version of it to an output string, and from what I read in the PiL guide(under reading files) that makes the garbage collector run wild because each time you append it throws out the old string. So for a string 500 characters long, it might throw out 500 strings. Is there any more efficient way of appending?
Edit: I tried posting my plugin but it's too long. I'll link to my website's copy. http://geocities.com/cage_fire_2000/Paste_As_MUSH.xml
Edit: I tried posting my plugin but it's too long. I'll link to my website's copy. http://geocities.com/cage_fire_2000/Paste_As_MUSH.xml