Click to See Complete Forum and Search --> : event handlers limits


JKeenan
September 14th, 2005, 09:24 AM
I have an event raiser, I have instantiated 20,000 objects, each which
"listen" for the event (call it event 1)... each of those 20K objects also
raise another event (event 2).... and for each of those 20k objects, I
instantiate 5 other objects (each listening for event 2.....

when event 1 is raised, the 20k listeners (in turn) catch event 1, and raise
event 2

main object <--listening for event 1--- Object A1 <--listening for event 2 ---- object B1
......
main object <--listening for event 1-- Object A20000 <--listening for event 2 ---- object B1

Since I tried this and it seems to work fine... the question is, is this
taxing the system (.net) too much? is there something about the event handler
bucket (function pointer stack) that wouldn't handle this or larger stack?

darwen
September 14th, 2005, 10:01 AM
It's unlikely to be honest.

The only problem you find with stack calls is in recursion.

However I would suggest that the speed of this design could be a real issue.

Darwen.