Does LuaInterface embedding in a C # application have slow performance?

I have included the LuaInterface project in an application written in C # using the .NET Framework 4.0. After compiling LuaInterface and Lua 5.1, I referenced them in my application and created Lua VM and exposed several .NET classes. When Lua VM does not make many calls, performance does not change at all; but when it starts calling more .NET functions, the whole application becomes slow and not responding.

In response to this, I made an extra thread to start the Lua VM. For some reason, the thread on which the GUI is being updated is not updated, and Lua makes a function call, which leads to stuttering in the GUI. When you move the window around, you can clearly see that it does not respond for a while, then it moves, does not respond, etc.

How can I solve this problem? I got the impression that give Lua its own thread, the other thread should not be influenced! Is this in some way related to my own code? Does LuaInterface have some serious problems with .NET features (performance)? What else can I use?

+3
source share
1 answer

LuaInterface .NET 4. DLL. , .NET 4, . MS:.NET Framework 4, interop .

http://msdn.microsoft.com/en-us/library/ff361650.aspx

, , . Visual Studio 2010 .NET 2, , , . .NET 4.

- , , , . LuaInterface , .

, ; , , . , , Windows Forms.

Windows Forms Controls http://msdn.microsoft.com/en-us/library/ms171728(v=vs.80).aspx

0

Source: https://habr.com/ru/post/1769288/


All Articles