lua_pushstring(state,"cursor")
lua_newtable(state)
lua_pushstring(state,"x")
lua_pushnumber(state,0)
lua_settable(state,-3)
lua_pushstring(state,"y")
lua_pushnumber(state,0)
lua_settable(state,-3)
lua_pushstring(state,"button")
lua_pushnumber(state,0)
lua_settable(state,-3)
lua_settable(state,LUA_GLOBALSINDEX)
This creates a table: cursor = { x = 0, y = 0, button = 0 }
This takes very little time on it's own. But I also have a function which I call to preload all the images of a directory in, when this is called, all the images load in fast, no delay, but the creation of the table seems to take longer than a minute. Why is this causing such a slow down?
I would load the images in anyway so I can't see much wrong with loading them all in at the start.
|