Kbase P184705: 4GL/ABL: Questions on PUBLISH and SUBSCRIBE statements, associated memory costs and transaction roll
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/25/2011 |
|
Status: Verified
GOAL:
4GL/ABL: Questions on PUBLISH and SUBSCRIBE statements, associated memory costs and transaction rollbacks
GOAL:
What are the memory consumption, memory leakage, performance degradation, etc. costs of a redundant subscription?
GOAL:
What are the memory consumption, memory leakage, performance degradation, etc. ramifications associated with subscribing more than once to the same named event?
GOAL:
What are the memory consumption, memory leakage, performance degradation, etc. costs of never executing the UNSUBSCRIBE?
GOAL:
What are the memory consumption, memory leakage, performance degradation, etc. ramifications associated with never canceling existing subscriptions to named events?
GOAL:
Is there any relationship between subscribing and un-subscribing to named events and transaction rollbacks?
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
FIX:
When a redundant subscription is requested, no error is reported and the request is ignored. The AVM does not allow a procedure to have more than one subscription to the same event/publisher. Hence, there no possible memory leaks generated by attempting to subscribe a procedure to the same named event multiple times. The only cost incurred in this case is the time the AVM has to loop through the existing subscriptions to check for duplicates.
When the procedure ends or is deleted, The AVM automatically un-subscribes it from any event the procedure subscribed to.
If the program doesn't unsubsribe from an event and the AVM clears the subscription, the only thing is that the memory used for tracking subscriptions will not be released until the end of the procedure.
As far as performance considerations, when you execute the PUBLISH statement, we are going to look at the list of subscribers and see which ones we have for the event being published. The number of subscribers will affect how long we take to see if a given event has a subscriber.
So it is strongly suggested to unsubscribe from an event when you are no longer need it. That would only affect the execution of PUBLISH.
Finally, there is no relationship whatsoever between the PUBLISH and SUBSCRIBE and transaction rollbacks.