Realised my error here :-)
Best use one event pipe with a collection of points to monitor, something like this
Private Sub ConstructEventPipe() On Error GoTo errHandle Set objEvents = New Collection Set objEventPipe = objAlarmList.Data.EventPipe errHandle: If Not err.Number = 0 Then Log err.source & ": " & err.Description, "alarms.ConstructEventPipe" On Error GoTo 0 End Sub
Much quicker now.
I don’t see in your code a place where you invoke the Take or TakeAll methods to free up the queue of events. It seems that you add a reference to the entire EventPipe object every loop and that object contains more and more items. This would certainly go in line with the behaviour you observe that is exponentially growing.
Events accumulated in the EventPipe queue are represented by PIEventObject object in the PI SDK. You can extract them by invoking Take or TakeAll methods of the EventPipe member such as:
Tell me if that fixed your problem.