[aquaria] Patch to run Lua scripts as threads

Alec Holowka zaphire at gmail.com
Sun Jul 4 15:55:23 EDT 2010

Slightly off topic, but I'm guessing one way to get everything onto one
state would be to append the name of the script to every common function

So like nautilusUpdate() or nautilus_update() instead of update()

This seems like it might be a major pain in the ass though?

On Sun, Jul 4, 2010 at 9:16 PM, Andrew Church
<achurch+aquaria at achurch.org<achurch%2Baquaria at achurch.org>
> wrote:

> >Having one lua_State per script rather than per entity would be huge
> memory
> >savings!
> >
> >It doesn't seem like that'd be much of a waste at that point. The waste is
> >loading the same scripts multiple times.
> Fair enough. (:  I was worried about the ~60k/state just from registering
> all the interface functions, but entityinclude by itself looks like it
> takes up 20k/instance, so that could cancel out the loss all on its own.
> I've implemented the code for your suggestion locally, and I'm working
> through the scripts now (which are going to be a gigantic commit, heh).
> On a tangent, and mostly out of curiosity:  What's the state of the
> ParticleEffectScript stuff in ScriptInterface.cpp?  It's all inactive
> as far as I can tell; I had to comment it out for the new Lua state
> code because I wasn't quite sure how it was intended to work.  Is it
> something that could be useful if I integrated it into the new code, or
> should I not worry about it?
>  --Andrew Church
>    achurch at achurch.org
>    http://achurch.org/
> _______________________________________________
> aquaria mailing list
> aquaria at icculus.org
> http://icculus.org/mailman/listinfo/aquaria

Alec Holowka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/aquaria/attachments/20100704/4fa59c59/attachment.htm>

More information about the aquaria mailing list