lua-users home
lua-l archive

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


On Thu, Nov 29, 2012 at 5:53 PM, David Given <dg@cowlark.com> wrote:
> Also, while loading bytecode is faster, the Lua compiler is blisteringly
> fast anyway --- tens of megabytes of source a second.

in most cases, the startup time is dominated not by the compiler, but
by application-specific initialization of memory structures.

maybe there's a constant part of the state that is common to all
steps?  if initializating that takes a significant amount of time, it
might be better to create a 'common state server' Lua state on each
thread that starts, initializes that common state and dispatches it as
needed.  the 'worker' states would be ilghter to start, since have
less state, and use some simple API to reach to the 'server state'.

just an idea, maybe doesn't apply to your problem at all

--
Javier