View Issue Details

IDProjectCategoryView StatusLast Update
0001532Slicer4Core: Packagingpublic2012-02-21 10:32
Reporterkikinis Assigned Tofinetjul  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionSlicer 4.0.0 
Target VersionSlicer 4.0.1Fixed in VersionSlicer 4.0.1 
Summary0001532: Reduce package size
Description

Packages on Mac and Linux are heavy compared to the Windows packages.
It seems that it's possible to shrink them.

Additional Information

From Ron:
Hi,
on the mac, the nightly download is about 280MB This is very massive.

Is there a meaningful way to reduce the size of the download?

From Julien:
It's large indeed, I could argue on the "very massive" term but I won't :-)
For comparison, the linux package is 700mo and the windows builds are now around 150mo.
The packages used to be smaller in August/September (windows builds were as small as 80mo).
When I look inside the the content of the mac package, I don't really see anything useless that is wasting space.

I suspect the inclusion of EMSegment + BrainstTools inside the package (instead of being extensions (our goal)) is partly responsible for the increase.

Now, we can probably configure the c++ compiler to optimize the size of the libraries, but I'm not sure how much space we will get back.
Before we do that, I've noticed that you experienced some asserts in the past, I wonder if that means that some libs in Slicer are compiled in Debug mode, which takes more memory space.
I guess all of what I'm saying is that it would need some more investigation which can be time consuming, your call in deciding if it worth it.

My preference would be to cleanup the linux package first.

From Jc:
On linux, the --visibility=hidden flag should be added. This is something I had on my list.

"It reduces the size of your DSO by 5-20%. ELF's exported symbol table format is quite a space hog, giving the complete mangled symbol name which with heavy template usage can average around 1000 bytes. C++ templates spew out a huge amount of symbols and a typical C++ library can easily surpass 30,000 symbols which is around 5-6Mb! Therefore if you cut out the 60-80% of unnecessary symbols, your DSO can be megabytes smaller! "

See http://gcc.gnu.org/wiki/Visibility

TagsNo tags attached.

Activities

finetjul

finetjul

2011-12-20 07:19

administrator   ~0003469

Last edited: 2011-12-20 08:12

On Linux:
Slicer 4.0.1 (2011_12_19) 64b: libMRMLCore.so = 19 530 ko
Slicer 3.6.3 (2011_03_04) 64b: libMRML.so = 4 800 ko

doing nm -D libMRML[Core].so on both, and we see that there are actually more symbols exported by libMRML.so (Slicer3) than libMRMLCore.so (Slicer4).
The difference in size must come from compilation flags (optimization...).

On my machine (Ubuntu 10.04):
Build in Release mode : libMRMLCore.so = 3 408 ko
Build in MinSizeRel mode: libMRMLCore.so = 2 899 ko
Build in Debug mode: libMRMLCore.so = 17 082 ko

So that means the linux package on the factory is building in Debug mode.

finetjul

finetjul

2011-12-20 09:02

administrator   ~0003470

We should probably do the following in our driver script:
set(CTEST_CONFIGURATION_TYPE "Release")

http://cmake.3232098.n2.nabble.com/Set-build-config-in-a-ctest-script-td6086032.html

I just setup the linux night dashboard, let's see if that works tomorrow.

jcfr

jcfr

2011-12-20 09:21

administrator   ~0003471

From CMake source code ..

// Build configuration is determined by: CONFIGURATION argument,
// or CTEST_BUILD_CONFIGURATION script variable, or
// CTEST_CONFIGURATION_TYPE script variable, or ctest -C command
// line argument... in that order.

See http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestBuildCommand.cxx;h=b984e850f5e9a937259c1159973ce66aee3d0df5;hb=HEAD#l72

finetjul

finetjul

2012-01-04 20:19

administrator   ~0003489

Mac and Linux packages were built in Debug mode:
Fixed in r18964:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=18964
For the linux package, a Qt in Release mode with no Debug information has been compiled and it used when building Slicer packages

On ubuntu:
Slicer4 before 12/20/2011: 639mo
Slicer4 after 12/21/2011: 249mo
Slicer3 package: 256mo

Issue History

Date Modified Username Field Change
2011-11-09 14:44 finetjul New Issue
2011-11-09 14:44 finetjul Status new => assigned
2011-11-09 14:44 finetjul Assigned To => jcfr
2011-12-20 07:19 finetjul Note Added: 0003469
2011-12-20 07:27 finetjul Note Edited: 0003469
2011-12-20 07:37 finetjul Note Edited: 0003469
2011-12-20 08:12 finetjul Note Edited: 0003469
2011-12-20 09:02 finetjul Note Added: 0003470
2011-12-20 09:21 jcfr Note Added: 0003471
2012-01-04 20:12 finetjul Reporter finetjul => kikinis
2012-01-04 20:12 finetjul Assigned To jcfr => finetjul
2012-01-04 20:19 finetjul Note Added: 0003489
2012-01-04 20:19 finetjul Status assigned => resolved
2012-01-04 20:19 finetjul Fixed in Version => Slicer 4.0 AHM Winter 2012
2012-01-04 20:19 finetjul Resolution open => fixed
2012-02-21 10:32 kikinis Status resolved => closed