Does the number of events affect Performance ??
-
Hi, I have a DCOM application, where the component fires 8-10 events. But all the events are similar in structure. (ie. they doesnt have any data associated with them). The only difference is the event name. So, I can easily use a single event to Notify all my events to the client (And have some Parameter that distinguishes the event to the client). Now, my question is will this (using a single event in place of many events) provide any PERFORMANCE benefits in a DCOM application ?? if yes, How ?? (some technical description will be appreciated) anyway, the number of Network RoundTrips is going to be the same... if no, What will be a good COM programming practice in this situation. (using a Single event or using different events) Please somebody reply ...:( I had posted this earlier, but got no response... Thanks, Firoz.
-
Hi, I have a DCOM application, where the component fires 8-10 events. But all the events are similar in structure. (ie. they doesnt have any data associated with them). The only difference is the event name. So, I can easily use a single event to Notify all my events to the client (And have some Parameter that distinguishes the event to the client). Now, my question is will this (using a single event in place of many events) provide any PERFORMANCE benefits in a DCOM application ?? if yes, How ?? (some technical description will be appreciated) anyway, the number of Network RoundTrips is going to be the same... if no, What will be a good COM programming practice in this situation. (using a Single event or using different events) Please somebody reply ...:( I had posted this earlier, but got no response... Thanks, Firoz.
From a mantainability and debugging point of view combining all events into a single one would of course be more beneficial. I don't believe I've seen any performance difference in using multiple events rather than a single one, as you said the round trips will be the same.
-
Hi, I have a DCOM application, where the component fires 8-10 events. But all the events are similar in structure. (ie. they doesnt have any data associated with them). The only difference is the event name. So, I can easily use a single event to Notify all my events to the client (And have some Parameter that distinguishes the event to the client). Now, my question is will this (using a single event in place of many events) provide any PERFORMANCE benefits in a DCOM application ?? if yes, How ?? (some technical description will be appreciated) anyway, the number of Network RoundTrips is going to be the same... if no, What will be a good COM programming practice in this situation. (using a Single event or using different events) Please somebody reply ...:( I had posted this earlier, but got no response... Thanks, Firoz.
Firoz wrote: the number of Network RoundTrips is going to be the same... How do you figure? As I see it, DCOM needs to setup for each call. If you only call once, this setup (marshalling and whatnot) is only done once. If you do many calls, this setup needs to be done each time. Sure the amount of data (from your point of view) being sent is the same (1 x 10 events or 10 x 1 events), but I think you need to take into consideration the setup and teardown of the connection. Please correct me if I'm wrong. :) J