Contents

CMake performance Analysis

During the 31st 3D Slicer Project Week, we found a loss of performance in CMake for the generation of Slicer targets in the operating system Windows. The performance loss means the time for the generation of the target is larger than the operating system Linux. This page analysises the performance loss in Windows in several computers: two desktops and a laptop. The computer configurations are shown in the table below.

Desktop1

Desktop2

Surface

Processor

Intel i7-6700 CPU 3.40GHz

Intel i7-6700 CPU 3.40GHz

Intel i7-8650U CPU 2.11GHz

RAM

16GB

16GB

16GB

Disk storage

Hard disk Drive (HDD)

Solid State Drive (SSD)

Solid State Drive (SSD)

Operating system

Windows 10 x64

Windows 10 x64

Windows 10 x64

Enviroment

The test enviroment uses the CMake version 3.14.4 and the master branch of Slicer repository of the fork mt4sd link.

The 21 tests were generated in different configuration variables. All tests were executed in the folder Slicer-SuperBuild/Slicer-build after the Slicer had been built.

When the number of the targets is decreased, the time saving is meaningful. In the desktop 1, the time reduction is around 65% and is around 64% and 49% in the desktop2 and the surface respectively.

The hard disk technologies affect the time reduction. If the hard disk technology is SSD, the time reduction average is 29 %. Moreover, the time saving is larger test 1 (43%) than tests 4 y 5, because the number of files generated in test 1 is larger than tests 4 y 5 in the configuration four targets.

The variable Slicer_BUILD_QTLOADABLEMODULES has a relevant impact on generate time. The time reduction is between from 65% to 75% when the variable Slicer_BUILD_QTLOADABLEMODULES is not active and four targets. All remaining variables affect lesser in the reduction time.

Conclusions

The number of the targets, the hard disk technologies and the variable Slicer_BUILD_QTLOADABLEMODULES have an important impact on the the CMake configuration time. The time saving average is 59% when the number of targets is one. The time reduction average is 29 % if the SSD technology is used.