Difference between revisions of "User:DavidJCobb/Stack dumping"

m
imported>DavidJCobb
m (CONFIRMED: RegisterForSingleUpdate(x) creates a new stack in x seconds, rather than creating a new stack immediately and suspending it for x seconds. Important distinction, that.)
imported>DavidJCobb
Line 21: Line 21:
*** Remember that your own resources can be shared. If you have a magic effect that coordinates itself via a quest, anyone with that magic effect will be sharing that quest.
*** Remember that your own resources can be shared. If you have a magic effect that coordinates itself via a quest, anyone with that magic effect will be sharing that quest.
** You can "eat" some of the stacks by having your event handlers [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate(''n'')]], and doing your actual processing in an [[OnUpdate - Form|OnUpdate()]] event. If ''x'' events occur within ''n'' seconds of each other, you'll process all of those events just one time.
** You can "eat" some of the stacks by having your event handlers [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate(''n'')]], and doing your actual processing in an [[OnUpdate - Form|OnUpdate()]] event. If ''x'' events occur within ''n'' seconds of each other, you'll process all of those events just one time.
*** Effectively, those ''x'' events will register for an update and return immediately, clearing ''x'' stacks out of memory. Then, in ''n'' seconds, one new stack will be created to do your processing.
*** Effectively, those ''x'' events will register for an update and return immediately, clearing ''x'' stacks out of memory. Then, ''n'' seconds after the ''x''th event fired, one new stack will be created to do your processing.


=== Events that can trigger large numbers of suspended stacks ===
=== Events that can trigger large numbers of suspended stacks ===
Anonymous user