[aquaria] Patch to run Lua scripts as threads

Ryan C. Gordon icculus at icculus.org
Wed Jul 7 10:26:30 EDT 2010

> that we don't have to compile every script umpteen times over.  It does

For the PSP, is there any reason we can't just precompile the scripts? 
Use luac to convert it down to bytecode, and then load the bytecode 
files instead of the .lua versions (or perhaps, compile to bytecode the 
first time you see that file is missing or outdated).

If you hand uncompiled Lua code to Lua, it compiles it to bytecode in a 
temporary buffer before running it anyhow anyhow, so you'd be saving 
yourself from having to parse the source code, etc at a minimum. Lua can 
be compiled without the parser, too, if you know you're always going to 
give it bytecode.

As far as code changes go: lua_load() and dofile(), etc, notice the file 
is bytecode and do the right thing, so changes to Aquaria would be minimal.


More information about the aquaria mailing list