Hi,

I just can point you to my last email. It's like I predicted: the random memory 
access (iterators) take magnitudes of order more time in debug mode because of 
all the checks that are made in each and every memory access. There might be a 
setting somewhere to disable or minimize those checks, but I didn't look into 
that any further.

Best,
Stefan

From: Bertram Sabrowsky-Hirsch 
[mailto:[email protected]]
Sent: Mittwoch, 14. März 2018 13:00
To: Dinkelacker, Stefan; [email protected]
Subject: RE: [mitk-users] Volume Rendering Plugin initialization very slow in 
Debug configuration

Hi Stefan,

That's right I'm working with Windows and Visual Studio 2017. Thanks for the 
advice, I tried that yesterday but eventually gave up on using the Profiling 
Tools as I had multiple issues with it. Instead I used the Visual Studio 
Debugger to step and identify the parts of the code that slow down the app. 
There seem to be two major bottlenecks after enabling Volume Rendering for a 
selected Image:

1. (54 seconds)
In QmitkTransferFunctionGeneratorWidget::SetDataNode there is a call to 
ImageStatistcsHolder::GetScalarValueMin(). The time is spent in 
mitk::_ComputeExtremaInItkImage when the 
itk::ImageRegionConstIterator<ItkImageType> iterates over each pixel.

2. (6 seconds)
In vtkVolumeTexture::LoadTexture the call to 
vtkVolumeTexture::SelectTextureFormat. The time is spent in the calls to 
vtkDataArray::GetFiniteRange.

3. (22 seconds)
In vtkVolumeTexture::LoadTexture when tupPtr is filled in a 3D loop.

I can't figure out why those operations are so slow in debug mode when they 
perform well in release mode. Do you have any suggestions?

Thank you very much in advance.

Kind regards,
Bertram

From: Dinkelacker, Stefan [mailto:[email protected]]
Sent: 12 March 2018 12:37
To: Bertram Sabrowsky-Hirsch 
<[email protected]<mailto:[email protected]>>;
 [email protected]<mailto:[email protected]>
Subject: AW: [mitk-users] Volume Rendering Plugin initialization very slow in 
Debug configuration


Hi,



I guess you are working on Windows to have such big differences between Debug 
and Release configurations? With Visual Studio 2017 you can use the profiling 
tools to easily get an idea of where the time is spent. Such huge differences 
between debug and release configurations usually means that there is a lot of 
random memory access going which is encapsualated in debug configuration by 
expensive checks. There might be a compiler setting to disable these checks and 
gain some speed.



Best,

Stefan

________________________________
Von: Bertram Sabrowsky-Hirsch 
<[email protected]<mailto:[email protected]>>
Gesendet: Montag, 12. März 2018 12:00
An: [email protected]<mailto:[email protected]>
Betreff: [mitk-users] Volume Rendering Plugin initialization very slow in Debug 
configuration

Hi,

I am working on an Aneurysm Simulation Plugin relying on the Volume Rendering 
Plugin for 3D Rendering of some steps. For that I just set the volume rendering 
property of my Image data node.
It is working both in the Release and the Debug Configuration, however the 
Debug configuration has an awful initialization lag/freeze (I suppose from the 
Mapper Initialization) of more than 90 seconds after I set the flag. Its 
independent of the size of the Image data and will only occur the first time in 
one execution run, subsequently setting the property for different nodes runs 
smoothly. In the release configuration there is a lag but that lasts only for 
less than 2 seconds. I'm working with MITK 2016.11.99-974bf5ad.

Does anyone experience the same issue? I thought about using RelWithDebInfo but 
failed to build MITK for that configuration. The lag is quite frustrating and I 
now tend to avoid using the Debug configuration. Any advice would be much 
appreciated.

Thank you very much in advance.

Kind regards,

Bertram
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to