CaPTk
CaPTk copied to clipboard
CaPTk hogs memory
Description: CaPTk hogs memory
Steps to reproduce the behavior:
- Load an image in CaPTk (ex: http://www.dclunie.com/pixelmedimagearchive/upmcdigitalmammotomocollection/index.html )
- Open Task Manager and see memory usage
- Load the same image in MITK and check memory usage
Screenshots: Please see the screenshots when 1 image of 1GB was loaded into CaPTk vs MITK
CaPTk Version: 1.7.3
OS: Windows 10
(note that in the screenshot it just reaches the maximum of the system. With an 1GB image in a 32GB machine it reached 20GB+ of memory usage)
@dboun 20GB was in Debug mode
I think a big reason behind this is the fact that CaPTk always loads images as Floats whereas MITK does not. And that is done on CaPTk to facilitate easier computation and not having to cast. In any case, this is simply a no-go but I am not sure if this is something we want to tackle now.
I think a big reason behind this is the fact that CaPTk always loads images as Floats
I don't think that float images can make memory usage get to 20x+ the image size. It's probably because multiple copies are generated somehow.
@dboun 20GB was in Debug mode
Yes, but it was maxed out on the 32GB system too. It could have been more
We can't be tackling this now. It needs a lot of refactoring. But perhaps when we are all looking at adding new code or fixing bugs, it might be better to also keep the memory footprint in mind. And if we come across anything specific in the code, we can discuss it in our meetings.