Page MenuHomePhabricator

Compilation of DicomSeriesReader takes too much memory
Closed, ResolvedPublic

Description

Short observation on an Ubuntu client: 1.4GB resident memory for compilation of only mitkDicomSeriesReader.cpp.o

This is too much at times and might cause the compiler to be terminated.

Splitting of the file into multiple smaller parts should be considered, similar to mitkImageCastPartX

Event Timeline

New remote branch pushed: bug-16310-split-seriesreader-compilation

I was able to

  • distribute the 2000 lines in mitkDicomSeriesReader into multiple compilation units, named by topic/class
  • split the bigger switch/case statement in DicomSeriesReader::LoadDicomSeries into four units, which will lead to less memory being used by compilers

Please see associated branch at

http://mitk.org/git/?p=MITK.git;a=tree;f=Core/Code/IO;h=f7b12a9ecf732777bdef2bad4a7a3a2af194de94;hb=2761b3d71a87dd93c15b6b277865c8e290aca312

[68ebe9]: Merge branch 'bug-16310-split-seriesreader-compilation'

Merged commits:

2013-10-22 15:08:03 Daniel Maleike [2761b3]
Distributed more than 2000 lines of code into separate files

Conflicts:

Core/Code/IO/mitkDicomSeriesReader.cpp


2013-10-22 14:05:15 Daniel Maleike [9583e2]
Move untemplated code from txx to cpp

Conflicts:

Core/Code/IO/mitkDicomSeriesReader.cpp


2013-10-22 14:02:38 Daniel Maleike [7d500c]
Move switch/case code into multiple methods, untemplate LoadDicom

Temporarily reopened to rebase branch for integration into branch releases/snapshot-201308.

New remote branch pushed: bug-16310-split-seriesreader-compilation-rebased-snapshot-201308