2009/5/23 James Paige <[email protected]>:
> On Sat, May 23, 2009 at 06:03:21AM +1200, Ralph Versteegen wrote:
>> 2009/5/23 James Paige <[email protected]>:
>> > On Fri, May 22, 2009 at 10:23:56AM -0700, [email protected] 
>> > wrote:
>> >> teeemcee
>> >> 2009-05-22 10:23:56 -0700 (Fri, 22 May 2009)
>> >> 256
>> >> Based on some profiling of Baconthulhu, tweak the freeing of loaded 
>> >> scripts. I'm not really sure if this is any improvement, though. More 
>> >> importantly, it turns out that Baconthulhu needs over 128 scripts loaded 
>> >> at once!, so expanded scripts() to 256 slots.
>> >> ---
>> >
>> > Ah, you notice I had to use a global to cap recursion depth :)
>>
>> No, the related global is numloadedscr, which was my addition
>
> No, I mean I added a global in the plotscripts for baconthulhu to limit
> recursion there.

Ah, wow.
I wonder what sort of limit we should set when we switch to script
threads/multitasking? Maybe 2048 total script instances or something
like that. Will want to accommodate one AI/movement script thread per
NPC.

>> > Hey, what is your procedure for profiling? I'd like to try it.
>> >
>> > ---
>> > James
>>
>> Pretty primitive: I uncommented all the stuff in freescripts and
>> examined g_debug.txt to eyeball how badly it was deciding which
>> scripts to unload. You can tell whenever freescripts is run because
>> the game pauses for a fraction of a second. Compare various freeing
>> schemes subjectively by which causes the fewest calls to freescripts.
>> In the end it's all pointless because Baconthulhu used more than 128
>> scripts regularly.
>
> Ah, okay. I thought you were using some sort of external profiling tool
> or a magic gdb option I didn't know about or something.
>
> ---
> James
> _______________________________________________
> Ohrrpgce mailing list
> [email protected]
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to