<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Optimizing Build Times for Large C Projects</title>
	<atom:link href="http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/</link>
	<description>A Programmer's View of Game Design, Development, and Culture</description>
	<lastBuildDate>Wed, 18 Apr 2012 02:55:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Optimising build times</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-1144</link>
		<dc:creator><![CDATA[Optimising build times]]></dc:creator>
		<pubDate>Mon, 28 Jun 2010 16:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-1144</guid>
		<description><![CDATA[[...] just came across this post and want to remember it so posing here. http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/. I am most interested in the uplift in compilation time based on unused #includes and build [...]]]></description>
		<content:encoded><![CDATA[<p>[...] just came across this post and want to remember it so posing here. <a href="http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/" rel="nofollow">http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/</a>. I am most interested in the uplift in compilation time based on unused #includes and build [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frederic Hebert</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-1126</link>
		<dc:creator><![CDATA[Frederic Hebert]]></dc:creator>
		<pubDate>Tue, 18 May 2010 18:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-1126</guid>
		<description><![CDATA[Here is our experimentation to improve build time :

We are using visual studio to build our applications. Our biggest concern is link time especially for debug target. I list bellow what we tried to minimized link time and what were the gain. If you have others suggestions, reply to my post.

Note that I post a suggestion on “Microsoft Connect” titled “Optimize link time in real developers environment”, feel free to vote for it at : https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=511300&amp;wa=wsignin1.0

1 - Convert many statics libraries to DLLs. Important gain.

2 - Remove debug information for libraries who are rarely debugged (good gain).

3 - Delete PDB file in « Pre-Build Event » (strangely it give interesting gain ex: 2min44 instead of 3min34).

4 - Working with computer equiped with lot of RAM in order to maximize disk cache. The biggest gain. Same computer can link 20 times faster with 16GB instead of 2GB. More than 16GB change nothing.

5 - Big obj versus small obj. No difference.

6 - Use secret linker switch /expectedoutputsize:120000000. Small gain.

7 - Maximize Internal linkage vs External linkage. It&#039;s a good programming practice.

8 - IncrediLink (IncrediBuild give interesting gain for compilation but almost no gain for link).

9 - Explicit template instantiation to reduce code bloat. Small gain.

10 - Partial template specialization to decrease the number of symbols. Small gain.

11 - Change project options (/Ob1, /INCREMENTAL, Enable COMDAT folding, Embedding manifest, etc.). Some give interesting gain other not. We try to continuously maximize our settings.

12 - Separate software component as much as we can afford to minimize dependencies. You can then work in unit test that link fast. But we still have to integrate things together, we have legacy code and we worked with third party components.

Note that for all our experimentations, we meticulously measured link time to ensure repeatability.

Thanks


Original post:

http://www.codeproject.com/Messages/3300274/Re-Minimized-link-time-of-Cplusplus-applications.aspx

https://connect.microsoft.com/VisualStudio/feedback/details/511300/optimize-link-time-in-real-developers-environment]]></description>
		<content:encoded><![CDATA[<p>Here is our experimentation to improve build time :</p>
<p>We are using visual studio to build our applications. Our biggest concern is link time especially for debug target. I list bellow what we tried to minimized link time and what were the gain. If you have others suggestions, reply to my post.</p>
<p>Note that I post a suggestion on “Microsoft Connect” titled “Optimize link time in real developers environment”, feel free to vote for it at : <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=511300&#038;wa=wsignin1.0" rel="nofollow">https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=511300&#038;wa=wsignin1.0</a></p>
<p>1 &#8211; Convert many statics libraries to DLLs. Important gain.</p>
<p>2 &#8211; Remove debug information for libraries who are rarely debugged (good gain).</p>
<p>3 &#8211; Delete PDB file in « Pre-Build Event » (strangely it give interesting gain ex: 2min44 instead of 3min34).</p>
<p>4 &#8211; Working with computer equiped with lot of RAM in order to maximize disk cache. The biggest gain. Same computer can link 20 times faster with 16GB instead of 2GB. More than 16GB change nothing.</p>
<p>5 &#8211; Big obj versus small obj. No difference.</p>
<p>6 &#8211; Use secret linker switch /expectedoutputsize:120000000. Small gain.</p>
<p>7 &#8211; Maximize Internal linkage vs External linkage. It&#8217;s a good programming practice.</p>
<p>8 &#8211; IncrediLink (IncrediBuild give interesting gain for compilation but almost no gain for link).</p>
<p>9 &#8211; Explicit template instantiation to reduce code bloat. Small gain.</p>
<p>10 &#8211; Partial template specialization to decrease the number of symbols. Small gain.</p>
<p>11 &#8211; Change project options (/Ob1, /INCREMENTAL, Enable COMDAT folding, Embedding manifest, etc.). Some give interesting gain other not. We try to continuously maximize our settings.</p>
<p>12 &#8211; Separate software component as much as we can afford to minimize dependencies. You can then work in unit test that link fast. But we still have to integrate things together, we have legacy code and we worked with third party components.</p>
<p>Note that for all our experimentations, we meticulously measured link time to ensure repeatability.</p>
<p>Thanks</p>
<p>Original post:</p>
<p><a href="http://www.codeproject.com/Messages/3300274/Re-Minimized-link-time-of-Cplusplus-applications.aspx" rel="nofollow">http://www.codeproject.com/Messages/3300274/Re-Minimized-link-time-of-Cplusplus-applications.aspx</a></p>
<p><a href="https://connect.microsoft.com/VisualStudio/feedback/details/511300/optimize-link-time-in-real-developers-environment" rel="nofollow">https://connect.microsoft.com/VisualStudio/feedback/details/511300/optimize-link-time-in-real-developers-environment</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anna-Jayne Metcalfe</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-749</link>
		<dc:creator><![CDATA[Anna-Jayne Metcalfe]]></dc:creator>
		<pubDate>Sun, 06 Dec 2009 08:54:13 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-749</guid>
		<description><![CDATA[&lt;blockquote cite=&quot;Matt Hargett&quot;&gt;As far as distributed PC-Lint runs, I’m curious if you’re doing a file-by-file analysis or generating LOB files for an inter-module analysis. I have personally found that an inter-module analysis is really necessary for taking advantage of PC-Lint’s strengths (inter-function value tracking, etc) to find deep bugs.&lt;/blockquote&gt;

The IncrediBuild integration currently supports either single file or whole project analysis (the latter of which will run one project per core of course, so it&#039;s only really worth doing if you have a lot of projects). FWIW the value tracking in PC-lint 9.0 is much improved over 8.0, and even a single file analysis can offer far more information on potential defects than most teams seem able to deal with (nobody likes bad news, right?). That&#039;s a shame, as it&#039;s capable of so much more.

LOB files do indeed offer a way to do detailed inter-module tracking which is not available in other modes (as does whole project analysis, of course). We&#039;ve not yet implemented support for LOBs in Visual Lint as none of our customers have asked for it (something which surprised me, quite frankly. By contrast whole project analysis was much requested from the outset). If any of our customers wants full LOB file support badly enough we&#039;ll happily implement it. :)

I&#039;m not sure about the answer to your disk bottleneck question - the only way to be sure for real is to try it. I suspect either will bring a great improvement over a typical configuration, though. If you&#039;re looking into performance PC-lint 9.0 precompiled header file support is worth looking into once it&#039;s mature as it can dramatically reduce analysis times. However, as our tests in 9.00a through 9.00c show additional messages are being produced when PCH is enabled, we&#039;ve held off full support for it until that&#039;s resolved.]]></description>
		<content:encoded><![CDATA[<blockquote cite="Matt Hargett"><p>As far as distributed PC-Lint runs, I’m curious if you’re doing a file-by-file analysis or generating LOB files for an inter-module analysis. I have personally found that an inter-module analysis is really necessary for taking advantage of PC-Lint’s strengths (inter-function value tracking, etc) to find deep bugs.</p></blockquote>
<p>The IncrediBuild integration currently supports either single file or whole project analysis (the latter of which will run one project per core of course, so it&#8217;s only really worth doing if you have a lot of projects). FWIW the value tracking in PC-lint 9.0 is much improved over 8.0, and even a single file analysis can offer far more information on potential defects than most teams seem able to deal with (nobody likes bad news, right?). That&#8217;s a shame, as it&#8217;s capable of so much more.</p>
<p>LOB files do indeed offer a way to do detailed inter-module tracking which is not available in other modes (as does whole project analysis, of course). We&#8217;ve not yet implemented support for LOBs in Visual Lint as none of our customers have asked for it (something which surprised me, quite frankly. By contrast whole project analysis was much requested from the outset). If any of our customers wants full LOB file support badly enough we&#8217;ll happily implement it. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m not sure about the answer to your disk bottleneck question &#8211; the only way to be sure for real is to try it. I suspect either will bring a great improvement over a typical configuration, though. If you&#8217;re looking into performance PC-lint 9.0 precompiled header file support is worth looking into once it&#8217;s mature as it can dramatically reduce analysis times. However, as our tests in 9.00a through 9.00c show additional messages are being produced when PCH is enabled, we&#8217;ve held off full support for it until that&#8217;s resolved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hargett</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-744</link>
		<dc:creator><![CDATA[Matt Hargett]]></dc:creator>
		<pubDate>Tue, 01 Dec 2009 23:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-744</guid>
		<description><![CDATA[The &quot;Include Browser&quot; built into Eclipse CDT is great for this.

As far as distributed PC-Lint runs, I&#039;m curious if you&#039;re doing a file-by-file analysis or generating LOB files for an inter-module analysis. I have personally found that an inter-module analysis is really necessary for taking advantage of PC-Lint&#039;s strengths (inter-function value tracking, etc) to find deep bugs.

As far as disk-related bottlenecks, I have a question: would it be better to get a single 15K RPM disk or two 10K RPM disks in a SATA2 RAID configuration? I&#039;m trying to figure out if the elevator seeking would outperform the single spindle, even if it&#039;s slower.]]></description>
		<content:encoded><![CDATA[<p>The &#8220;Include Browser&#8221; built into Eclipse CDT is great for this.</p>
<p>As far as distributed PC-Lint runs, I&#8217;m curious if you&#8217;re doing a file-by-file analysis or generating LOB files for an inter-module analysis. I have personally found that an inter-module analysis is really necessary for taking advantage of PC-Lint&#8217;s strengths (inter-function value tracking, etc) to find deep bugs.</p>
<p>As far as disk-related bottlenecks, I have a question: would it be better to get a single 15K RPM disk or two 10K RPM disks in a SATA2 RAID configuration? I&#8217;m trying to figure out if the elevator seeking would outperform the single spindle, even if it&#8217;s slower.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paulo Pinto</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-565</link>
		<dc:creator><![CDATA[Paulo Pinto]]></dc:creator>
		<pubDate>Mon, 18 May 2009 21:16:51 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-565</guid>
		<description><![CDATA[Include Manager is indeed a great application although I find it difficult to use it effectively on very large projects.
Any hints from anyone that has used it successfully for large projects?]]></description>
		<content:encoded><![CDATA[<p>Include Manager is indeed a great application although I find it difficult to use it effectively on very large projects.<br />
Any hints from anyone that has used it successfully for large projects?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anna-Jayne Metcalfe</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-452</link>
		<dc:creator><![CDATA[Anna-Jayne Metcalfe]]></dc:creator>
		<pubDate>Sat, 28 Mar 2009 08:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-452</guid>
		<description><![CDATA[I can second Andy&#039;s suggestion about PC-lint and unused include folders. It&#039;s pretty effective and will identify all such issues in a single run without changing source files etc. if you set it up correctly (clue: -w0 -e766).

A a bonus, PC-lint is also (as our experience bears out) rather amenable to parallelisation to speed up the analysis runs (we were able to cut the analysis time for our 180k LOC codebase from over 4 hours to 15 minutes or so using IncrediBuild with 6 agents).

We&#039;ve also found that refactoring a codebase for unit testing will naturally reduce include dependencies and hence compilation time. Michael Feathers&#039; &quot;Working Effectively with Legacy Code&quot; is an excellent guide to the techniques you need to do this.

A final plug: IncludeManager by Profactor Software (&lt;a href=&quot;http://www.profactor.co.uk/includemanager.php&quot; rel=&quot;nofollow&quot;&gt;http://www.profactor.co.uk/includemanager.php&lt;/a&gt;) is a great way to visualise (in graphical form) the includes (and corresponding build time impact) for a given file or project so you can see what&#039;s going on. We use it extensively, and it&#039;s proved absolutely invaluable.]]></description>
		<content:encoded><![CDATA[<p>I can second Andy&#8217;s suggestion about PC-lint and unused include folders. It&#8217;s pretty effective and will identify all such issues in a single run without changing source files etc. if you set it up correctly (clue: -w0 -e766).</p>
<p>A a bonus, PC-lint is also (as our experience bears out) rather amenable to parallelisation to speed up the analysis runs (we were able to cut the analysis time for our 180k LOC codebase from over 4 hours to 15 minutes or so using IncrediBuild with 6 agents).</p>
<p>We&#8217;ve also found that refactoring a codebase for unit testing will naturally reduce include dependencies and hence compilation time. Michael Feathers&#8217; &#8220;Working Effectively with Legacy Code&#8221; is an excellent guide to the techniques you need to do this.</p>
<p>A final plug: IncludeManager by Profactor Software (<a href="http://www.profactor.co.uk/includemanager.php" rel="nofollow">http://www.profactor.co.uk/includemanager.php</a>) is a great way to visualise (in graphical form) the includes (and corresponding build time impact) for a given file or project so you can see what&#8217;s going on. We use it extensively, and it&#8217;s proved absolutely invaluable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Brice</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-451</link>
		<dc:creator><![CDATA[Andy Brice]]></dc:creator>
		<pubDate>Sat, 28 Mar 2009 03:37:47 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-451</guid>
		<description><![CDATA[IIRC PC-Lint from Gimpel can spot unnecessary #include&#039;d files.

I have a RAID 1 harddisk for robustness. What would be the best way to add another drive (or 2) to speed up compile times - RAID X (what would X be?).]]></description>
		<content:encoded><![CDATA[<p>IIRC PC-Lint from Gimpel can spot unnecessary #include&#8217;d files.</p>
<p>I have a RAID 1 harddisk for robustness. What would be the best way to add another drive (or 2) to speed up compile times &#8211; RAID X (what would X be?).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amol Deshpande</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-397</link>
		<dc:creator><![CDATA[Amol Deshpande]]></dc:creator>
		<pubDate>Sat, 14 Feb 2009 20:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-397</guid>
		<description><![CDATA[Interestingly, the windows.h in the new Windows SDK is now a small file that has much more control over what it includes (you can #define various things to turn off including other files). 

Also, #define WIN32_LEAN_AND_MEAN (for pre-vista SDKs), precompiled headers, and &quot;#pragma once&quot; instead of old-school include guards can also help a lot.]]></description>
		<content:encoded><![CDATA[<p>Interestingly, the windows.h in the new Windows SDK is now a small file that has much more control over what it includes (you can #define various things to turn off including other files). </p>
<p>Also, #define WIN32_LEAN_AND_MEAN (for pre-vista SDKs), precompiled headers, and &#8220;#pragma once&#8221; instead of old-school include guards can also help a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ludwig</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-396</link>
		<dc:creator><![CDATA[Joe Ludwig]]></dc:creator>
		<pubDate>Sat, 14 Feb 2009 02:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-396</guid>
		<description><![CDATA[The compile times on Pirates were about half an hour for a full rebuild. About ten minutes of that time was spent linking.  It turns out that linking DLLs with a huge number of exports is painfully slow, and we had about 15 of those. That&#039;s something I&#039;m going to try to avoid in future projects. :)

I don&#039;t remember what I used to measure exactly. I think I just downloaded a LOC counting add-on for Visual Studio.]]></description>
		<content:encoded><![CDATA[<p>The compile times on Pirates were about half an hour for a full rebuild. About ten minutes of that time was spent linking.  It turns out that linking DLLs with a huge number of exports is painfully slow, and we had about 15 of those. That&#8217;s something I&#8217;m going to try to avoid in future projects. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I don&#8217;t remember what I used to measure exactly. I think I just downloaded a LOC counting add-on for Visual Studio.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JZig</title>
		<link>http://doublebuffered.com/2009/02/11/optimizing-build-times-for-large-c-projects/#comment-395</link>
		<dc:creator><![CDATA[JZig]]></dc:creator>
		<pubDate>Thu, 12 Feb 2009 00:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://doublebuffered.com/?p=120#comment-395</guid>
		<description><![CDATA[Whaledawg, &lt;B&gt;Brute Force Perl Script&lt;/B&gt; is good at multi tasking.]]></description>
		<content:encoded><![CDATA[<p>Whaledawg, <b>Brute Force Perl Script</b> is good at multi tasking.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

