[Insight-developers] SimpleITK library size

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Apr 12 11:07:01 EDT 2011


After posting this e-mail, I began questioning if I was right or not. So I descided to grep around the symbols some. I build SimpleITK in debug mode and created a 1.5GB libSimpleITKBasicFilters... ugh. Then I did the following:

$ nm libSimpleITKBasicFilters.a   | grep -E "__.{2,3}St.*" | wc
$ nm libSimpleITKBasicFilters.a   | grep  -E "__.{2,3}3itk6simple.*" | wc
$ nm libSimpleITKBasicFilters.a   | grep -E "__.{2,3}3itk.*" | grep  -v -E "__.{2,3}3itk6simple.*" | wc



             lines         words        bytes            average b/w
itk         1998178 5976472   201087617 33.64  
simple 51310     150202      7809610      51.99
std       183838    549863     22422306    40.78
 

So it appears that the meta-programming instantiation is not to blame at all. This is just the size of ITK. However, because we are not exposing the ITK symbols at the SimpleITK interface, they all go away when using SimpleITK. That is to say that all the ITK symbols are internal and can be removed.

Brad

On Apr 11, 2011, at 2:38 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote:

> Dan,
> 
> Those are getting very big!
> 
> However, when I look at the size of the release libraries for the wrapped languages:  Tcl is 75MB, Java 74MB etc. The size is quite reasonable as all of ITK and it's libraries are statically linked to it. That means that it includes all of ITK's IO libraries too. Also I have been impressed with how slow it is growing when new filters are added. That has been my primary concern and I think that is still OK. Currently with about about 130 image ITK filter, and IO. I would estimate that the next 100 filters would take like 30 MB more and the current rate.
> 
> The 1GB size library does sound very large. But I do believe that we know where the size is going. It's all in the symbol names. More importantly we know that it's in internal symbol names. This points to the meta-programed template instantiation as the culprit. This may be be abled to be shrunk a little by using short names in certain places. However, I am not sure how much effort this is worth.
> 
> Brad
>  
> 
> 
> On Apr 11, 2011, at 1:27 PM, Daniel Blezek wrote:
> 
>> When compiling SimpleITK on Windows / Debug, I get an error lnk1106.  Apparently this is caused by trying to link libraries > 1Gb.  The bug is fixed in VS 10, with details here:
>> https://connect.microsoft.com/VisualStudio/feedback/details/521439/link-failure-lnk1106-on-ltcg-for-a-static-library
>> 
>> The upshot is that we will not be able to build debug unless using VS 10 under Windows.
>> 
>> -dan
>> 
>> P.S.  The Linux libSimpleITKBasicFilters.a weighs in at 270M, debug/coverage was ~1G
>> 
>> -- 
>> Daniel Blezek, PhD
>> Medical Imaging Informatics Innovation Center
>> 
>> P 127 or (77) 8 8886
>> T 507 538 8886
>> E blezek.daniel at mayo.edu
>> 
>> Mayo Clinic
>> 200 First St. S.W.
>> Harwick SL-44
>> Rochester, MN 55905
>> mayoclinic.org
>> "It is more complicated than you think." -- RFC 1925
> 
> ========================================================
> Bradley Lowekamp  
> Lockheed Martin Contractor for
> Office of High Performance Computing and Communications
> National Library of Medicine 
> blowekamp at mail.nih.gov
> 
> 
> <ATT00001..txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110412/5e28af05/attachment.htm>


More information about the Insight-developers mailing list