WoWInterface - View Single Post - Registering for all events / asynchronous code execution
View Single Post
06-30-20, 09:50 PM   #11
A Flamescale Wyrmkin
Join Date: Aug 2011
Posts: 142
Originally Posted by LudiusMaximus View Post
Thanks for the advice.

One more thing I have been thinking about. Do you think there will ever by a major update that will allow something like "asynchronous" execution of lua code?

At the moment it seems that the framerate is determined by whoever is slower: the GPU rendering the game world or the CPU executing any pending UI code. Normally, the UI does not take that much time. But actions like e.g. opening the "Appearances" frame brings with it a massive momentary FPS drop. The same is true to a lesser degree for just openning your bagpack (also without any addons). And even picking up an item while your backpack is open leads to 1-2 frames with a lower rate than the GPU would be able to render.

How fundamentally different would it be if the GPU does its thing rendering the game world as fast as possible and the lua code does its thing taking as long as it needs without throttling the FPS...?
This could be done with the Lua's coroutine, and since the Lua is single thread, so you don't need worry about the thread lock. We can yield those coroutines to make sure they don't cost too much in one frame to prevent fps dropping by the Lua codes.

But it's not easily to be done, we can't make all authors to use the coroutines, also we can't make all authors to use the coroutines under the same framework.

You can check my Scorpio-Async FrameWork for some ideas. Since most addons I used are created by my own, I can make all codes processed without fps dropping, but that only works for myself.

Somebody told me, the Scorpio is largely used in hack-apps like automatic combat for performance, it's sad that it's popular in a wrong direction.
  Reply With Quote