lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


hmm, these are a good solution when I just want to run the script once.

But in my case I do want to run the Lua script every frame. I just wanted to know if I should bother with a hash_table and luaL_loadbuffer or just use luaL_dofile because Lua already does some caching of files that was already read before.


2009/9/19 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>
> The question: Would it be reasonable to create a hash table with the Chunks
> already read instead of doing luaL_dofile? Or does Lua already does these
> inside of it in some implicit way?

require dfoes caching but you can do it manually as well. See
       http://stackoverflow.com/questions/1369646/do-file-only-once-in-lua/1371085#1371085



--
God$ g++ -o earth earth.cpp -O3 -lanimals -lplants -lvirus

http://fog.neopages.org/