The 'local' in your lua function is wrong and will cause an error. You can't have local table entries in Lua, only the whole table can be local.
Just remove it and it should work fine.
Since each move of the slider calls the function and thus causes an error, my guess is that this huge amount of errors cause the huge FPS drop.
If you comment/disable the function, make sure to also remove "wMarker_scale(self);" from the <OnValueChanged>, otherwise Lua will cause an error because it doesn't find the function -> lots of errors, fps loss.
Well, concerning the slashcommands, we would need the complete code for them, but maybe fixing the local already solves the issue.
Aaaand make sure that you have Lua errors enabled, so you can see them!
Apart from that, I can't give you any tips on XML - I've always scripted my frames in Lua :O