I am currently using QtScript for scripting functionality in my C ++ application, but it is rather "heavy" on the processor. When the thread evaluates all the scripts in the loop, processor utilization increases to 90% -100%. Even when I slept for 1 ms every 5 scripts, it remains above 75% of CPU usage.
Are there any other, easy-to-implement, framework scripts that are much lighter than QScript?
change
Now I understand that this is normal behavior, and not some kind of error in QtScript. However, it is interesting to know which (lighweight) script libraries are available.
Lua, , .
, ? script / , CPU 100%.
?
, script , . , ( " script" ) .
[]: 100%, script?
100% , - .
, 100% , . "0% " , ( " ", ).
: , - 40%, - 1 , 400 600 .
Lua , ++. , - , , .
iolanguage: iolanguage.
TinyScheme. , Lua ( , ).
, - Lua , , :
Lua . Windows, - LuaJIT, Lua
, , Squirrel (http://squirrel-lang.org/). , , .
, 100% CPU, , .
- ():
( = 1,10000000000000) = + end
100% , () - , , .
:
Lua, : Lua ANSI C. uber-, ++, "" . , Qt- ( SIGNAL s, SLOT s PROPERTY s), .
SIGNAL
SLOT
PROPERTY
Lua - . Qt.
javascript spidermonkey , javascript , lua.
QtScript , ( 4.6, , ). , , lua ββ python. native ( c/++) API script, , , .
QtScript ( QT ) script ... QT ( , ).
++ , SWIG. SWIG toLua, , lua, #, tcl, java python, . , toLua , SWIG.
Source: https://habr.com/ru/post/1709194/More articles:How to get groups included in an ActiveDirectory group using C #? - c #CAML cannot reference custom properties in custom fields - sharepointCan I create read-only items in SOAP web services? - c #LinqDataSource and DateTime format - sqlWhy can't I get FileChannel from FileWriter? - javaWhat is the difference between llblgen and nHibernate? - ormAre the first 32 bits of a 160-bit SHA1 hash an acceptable CRC32 hash replacement? - .netData type for unit of measurement in the database - units-of-measurementoracle insert with many WAN binding variables is very slow - performanceIn emacs XML mode, how can I format an XML schema file? - code-formattingAll Articles