Registering for all events / asynchronous code execution
View Single Post
06-30-20, 05:40 AM
A Cobalt Mageweaver
Join Date: Mar 2018
Originally Posted by
Calling a Lua function is the most taxing operation you can do. The best you can do is to make sure the game spends the least time possible in Lua code. Even if it's just an empty function.
That's interesting. Are you saying that calling a function is significantly more taxing than it would be to execute the function's code "inline"? When I code I try to use functions wherever I can to avoid writing the same code more than once. Does this make my code less efficient as more functions are called?
Another thing I was wondering: Is it more efficient to have one frame listening to several events and decide what to do depending on the event within the one OnEvent function. Or to have several frames each listening to only one event? Or does this make no difference?
~ Be the change you want to see in the world... of warcraft interface! ~
View Public Profile
Send a private message to LudiusMaximus
Find More Posts by LudiusMaximus