I preload the lua file using luaL_loadfile and then execute it a few timest (this is the server). I have several dofile() calls in a lua file.
luaL_loadfile
dofile()
Will luaL_loadfile also preload all dofile() into lua file?
No, luaL_loadfile does not execute any code in the file, in particular, it does not call the built-in dofile() or require or any other function calls.
require
Yes, but you shouldn't do that. Instead, upload the file once and execute it once in general (to run the code, define functions, etc.). Then just call certain functions several times.
Source: https://habr.com/ru/post/1392334/More articles:Python multiple regex replace - pythonHow to make a login screen, for example, Facebook? - iosAND line breaks and commas and half-columns - regexProblems with a link to an external project from my jsp - "ExternalClass cannot be resolved for type" - javaJava / JSP WEB-INF / classes cannot import - javaHow to get print values ββin python script in php variables in php script? - pythonError importing JSP page. Class file placed in package inside WEB-INF / classes - javaTransferring data between ASP.NET MVC 3 view hierarchy - c #Why does thread synchronization not work? - c ++What happened to this MERGE T-SQL statement? - mergeAll Articles