CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    23

    event handlers limits

    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?

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: event handlers limits

    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.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured