View Single Post
06-30-20, 05:40 AM   #7
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
Originally Posted by SDPhantom View Post
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! ~
  Reply With Quote