I’ve been seeing high CPU usage by the Slicer process when viewing live stream images from PLUS. I’m not sure if the issue is the rendering changes between Slicer 4.8 and 4.10 or an issue with OpenIGTLinkIF.
Environment1: Windows 10, Slicer 4.8.1, with OpenIGTLinkIF core module
Environment2: Windows 10, Slicer 4.10.1 with latest SlicerOpenIGTLink extension to use OpenIGTLinkIF.
I streamed two mmf webcam devices and connected to them in Slicer as port 18944 and 18945.
AcqusitionRate was specified as “1” FPS for both mmf devices. Confirmed with Slicer node statistics module that each were streaming as 1 FPS.
Layout: SideBySide, viewing both streams at same time
Using Environment1:
CPU usage for Slicer process: ~3%
GPU usage for Slicer process: ~3%
If I disconnect one of the nodes, as though only streaming 1 device, CPU usage for the process doesn’t appear to change.
Using Environment2:
CPU usage for Slicer process: ~30%
GPU usage for Slicer process: ~3%
If I disconnect one of the nodes, as though only streaming 1 device, CPU usage for the process drops to half so about ~15%.
Can you do some profiling? You might get some results using VerySleepy tool or VisualStudio’s built-in profiler, even if Slicer is just built in Release mode (you get more reliable info if you build in RelWithDebInfo).
What graphics card do you have in your computer?
I’ve found indications to that on some systems, VTK’s texture update operations take much longer time with the OpenGL2 rendering backend than with the old OpenGL backend. Maybe your testing can confirm this.
There have been many changes, so it is also possible that the additional CPU load comes from the OpenIGTLink or some other layers. Profiling should help in figuring out where to look.
Thanks for the quick fix! I built and confirmed the improvement to keep CPU usage lower.
For others to use the fix, will the SlicerOpenIGTLink extension get built and updated since the OpenIGTLinkIO dependency was updated? Should I expect the SlicerOpenIGTLink package in tomorrow’s builds to include the fix even though there was not a new commit to the SlicerOpenIGTLink repo?
I have been facing the same issue but I am unable to locate above mentioned code to change it, where can I find it in the PlusApp code(OpenIGTLinkIO). I am using windows 10.
Can you please guide me with instructions, I am totally new to it.
The mentioned fix was integrated in OpenIGTLinkIO and is included in both Plus and the SlicerOpenIGTLink extension.
What is the issue that you are having?
So I will start from the beginning, We are using PlusApp and slicer for the navigation purpose, As soon as I launch server for the above method my system gets very slow and causes a lapse in the tracking after fiducial registration, before launching the server CPU usage is in between 5-10% and as soon as I launch and start tracking CPU usage goes to 100%
PC configuration - OS -Windows 10, RAM -16GB, Graphic Card-6GB Nvidia
I suppose PC configuration is fine, may be I need to change some settings in the PlusApp or IGTLinkIF, I don’t know exactly where the problem lies.
What should I change in the code to reduce my CPU usage and to minimize the lapse.
That would depend on the device. Could you create a discussion for this on the PlusLib Github page (Discussions · PlusToolkit/PlusLib · GitHub) with more info about your Plus version and config file?