Hi all,
I’ve noticed that in every protocol, we get three default timers, and then we can add more as needed.
According to the documentation:
"Every timer defined in the protocol introduces an additional timer thread in the SLProtocol process." (Timers | DataMiner Docs).
This got me wondering, if a timer is declared in the protocol but never started or referenced, does it still consume system resources?
If yes, would it be a good practice to clean up and remove any unused timers, not just for code cleanliness, but also to reduce unnecessary resource usage and to improve protocol efficiency?
Or is it generally acceptable to leave them in place if they're not actively causing issues?
Thanks!
Hi,
If a timer is not used, I would recommend not defining it.
As soon as you define a timer, a timer object is created which consumes a bit of memory. Each timer also introduces a timer thread, but if the timer does not contain any group, then that thread will finish fast. (The timer thread checks if it has groups and if that is not the case, the timer thread will end.)
If not needed, it's best practice to not define it. The protocol template defines some timers that are typically used but feel free to remove those when not needed.