<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello all,<div><br></div><div>I have been idly trying to make the SimpelITK libraries smaller. I noticed over 35K of __PRETTY_FUNCTION__ string symbols in the simpleITK Python library, when build with the static sitk and itk libraries. The pretty function, is primarily used for the itkExceptoinMacros defined in itkMacro.h. I deleted that usage, and rebuilt. Now, there are only 5.7K of pretty symbols. The size of the library went down 11 megabytes, which is 9.5% of the total library size.</div><div><br></div><div>So our exceptions are entirely too verbose and there needs to be an option to reduce the amount of bloat they cause. As the macro already specifies the file name and line number where the exception occurred, I think the pretty location, is redundant, and quickly can cause bloat, so is should not be used in release mode by default.</div><div><br></div><div>I an reluctant to propose another top-level CMake variable for this, but I think this option needs to go into the itkConfigure.h file, as having a command line define may be too problematic. </div><div><br></div><div>Anyone have any thoughts on this topic?</div><div><br></div><div>I also would like to bring up that I am starting to use the "-fvisibility-inlines-hidden" and "-fvisibility=hidden". Initial results on SimpelITK reduced the library size by 20MB or 14%. The inline argument is harmless and appears to have no downside, and likely should be added as a default flag to just about all applications which use ITK. Changing the default visibility to hidden, is full of complications, and requires a large number of changes to the ITK libraries, mostly shouldn't be too hard.</div><div><br></div><div>I also believe that Wrap ITK should be able to significantly benefit from these observations, and likely reduce the size of the library by 20% with these improvements.</div><div><br></div><div>Brad</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>