06-13-2013 01:21 PM
I have been observing a spike in CPU when there is a case of sending a time delayed message on a cRIO. Is this a blocking function?
Thanks,.
Casey
Phoenix, LLC
CLA, LabVIEW Champion
Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!
Solved! Go to Solution.
06-13-2013 05:40 PM
Does "Time Delayed Send Message" still open a reference to a clone pool on each call? Because that might cause a spike.
07-12-2013 09:23 AM
Aristos Queue informed me that the Time Delayed Message is blocking in RT as currently coded.
Phoenix, LLC
CLA, LabVIEW Champion
Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!
07-13-2013 02:24 PM
How does something "blocking" cause a CPU spike?
07-16-2013 02:10 AM
Maybe the time delay code is a fast loop? By the way that would be strange ...
I am also interested in how can it be..
07-16-2013 03:38 PM
It is my understanding that a blocking method pauses all other methods. Upon release all methods that have been waiting will try to catch up.
I can say that if I increase the delay for sending the time delayed message that the corresponding peak gets higher until it reaches 100% and then it gets longer.
Casey
Phoenix, LLC
CLA, LabVIEW Champion
Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!
07-16-2013 04:26 PM
Worth noting here too that I recently removed some Time Delayed Message sending from my app, and saw pretty large performance benefits. I noticed during a profiling run that the function takes quite a huge amount of crunching to do, _if_ you repeatedly send one-off messages to be sent in the future(very different from sending a recurring message). It makes sense in hindsight since it creates a clone each time, but didn't notice for a long time.
But I saw times where it would take 100 ms on some cycles to actually perform the entire function.
So, were you using a recurring delayed message, or repeatedly using the send delayed message, one per call?
07-16-2013 09:28 PM
I was using it in "Handle Error.vi" of a Linked Network Actor when a connection error would occur. I would wait 1000 ms and then try to reconnect. It works, but with a big spike in CPU which prompted the initial question.
Phoenix, LLC
CLA, LabVIEW Champion
Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!