{"id":27464,"date":"2021-02-02T17:00:17","date_gmt":"2021-02-02T17:00:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=27464"},"modified":"2023-02-02T19:08:53","modified_gmt":"2023-02-02T19:08:53","slug":"playground-games-and-turn-10-studios-see-18-2x-and-4-95x-link-time-improvements-respectively-on-visual-studio-2019","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/playground-games-and-turn-10-studios-see-18-2x-and-4-95x-link-time-improvements-respectively-on-visual-studio-2019\/","title":{"rendered":"Playground Games and Turn 10 Studios See 18.2X and 4.95X Link Time Improvements Respectively on Visual Studio 2019"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-27478\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/Sunrise_KeyArt_Horiz_RGB_Final-small.jpg\" alt=\"Image Sunrise KeyArt Horiz RGB Final small\" width=\"2173\" height=\"1224\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/Sunrise_KeyArt_Horiz_RGB_Final-small.jpg 2173w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/Sunrise_KeyArt_Horiz_RGB_Final-small-300x169.jpg 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/Sunrise_KeyArt_Horiz_RGB_Final-small-1024x577.jpg 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/Sunrise_KeyArt_Horiz_RGB_Final-small-768x433.jpg 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/Sunrise_KeyArt_Horiz_RGB_Final-small-1536x865.jpg 1536w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/Sunrise_KeyArt_Horiz_RGB_Final-small-2048x1154.jpg 2048w\" sizes=\"(max-width: 2173px) 100vw, 2173px\" \/><\/p>\n<p>The C++ team at Visual Studio has delivered substantial build and link time improvements throughout Visual Studio 2019. This blog is Part 2 of a series of blogs showcasing real-world results of our efforts. See how the <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/the-coalition-sees-27-9x-iteration-build-improvement-with-visual-studio-2019\/\">Gears 5 team benefited from iteration build time improvements in Part 1.<\/a><\/p>\n<p>In this blog, the Forza Horizon 4 team shares tests results of compile and link times in three different versions of Visual Studio. Link times are now <strong>18.15X faster<\/strong> than in Visual Studio 2017. Likewise, Turn 10 Studios saw a <strong>4.95X<\/strong> improvement in link time. The decrease in build time enabled Playground Games to switch from <em>\/debug:fastlink<\/em> to<em>\/debug:full<\/em>. Analyzing the results, we can see not only massive iteration build time wins but also applicable real-world quality of life improvements.<\/p>\n<p><em><strong>\u201cUsing full linking removes the debugger stalls associated with fastlink and allows our engineering team to focus on debugging the current build rather than waiting for the development environment to become responsive. Coupled with the overall improvements to build and link times, this leads to less workflow interruption and productivity improvements across the team.\u201d<\/strong><\/em> \u2013 Andrew Sage from Playground Games<\/p>\n<h2><\/h2>\n<h2>Building Forza Horizon 4<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-scaled.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27468\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-scaled.jpg\" alt=\"Image ForzaHorizon4 Review 07 WM 4k\" width=\"2500\" height=\"1406\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-scaled.jpg 2500w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-300x169.jpg 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-1024x576.jpg 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-768x432.jpg 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-1536x864.jpg 1536w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_Review_07_WM_4k-2048x1152.jpg 2048w\" sizes=\"(max-width: 2500px) 100vw, 2500px\" \/><\/a><\/p>\n<h3><\/h3>\n<h3>Methodology<\/h3>\n<p>The Forza Horizon 4 team at Playground Games measured build times using Incredibuild\u2019s build monitor. The monitor shows wall clock time for each stage of the process. Compile time is measured at the start of the first file compile to immediately before linking. Link time is measured from start of the link step to the end of link step. Total time, measured by the start-to-end Incredibuild process, may be longer than compile and link times combined since some startup and post link steps are included in the measurement.<\/p>\n<p>Tests were conducted during quiet times at the studio to ensure parallel compiles were not affected by network load. To further reduce noise in data, tests were averaged over multiple runs, and were started after all hard drive disk activity had finished and Intellisense had finished parsing.<\/p>\n<h3><\/h3>\n<h3>Results<\/h3>\n<h4>Version 15.9.4 \/debug:<strong>fastlink<\/strong> vs 16.8 \/debug:<strong>full<\/strong><\/h4>\n<p>Comparing <em>\/debug:fastlink<\/em> in Visual Studio 2017 and <em>\/debug:full<\/em> in Visual Studio 2019 demonstrated real-world quality of life improvements. At first sight, total time has improved by a factor of <strong>1.26<\/strong>; however, considerable time of <strong>30-45 seconds<\/strong> per debug session was saved by switching to <em>\/debug:full<\/em>, resulting in large productivity gains. The engineers at Playground Games have made the switch to <em>\/debug:full<\/em> in order to both enjoy shorter build times and take advantage of the faster debugging experience afforded by <em>\/debug:full<\/em>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-fastvsfull.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27476\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-fastvsfull.png\" alt=\"Image FH fastvsfull\" width=\"1900\" height=\"1189\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-fastvsfull.png 1900w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-fastvsfull-300x188.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-fastvsfull-1024x641.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-fastvsfull-768x481.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-fastvsfull-1536x961.png 1536w\" sizes=\"(max-width: 1900px) 100vw, 1900px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<table style=\"width: 100.067%;\" width=\"451\">\n<tbody>\n<tr>\n<td style=\"width: 43.6123%; text-align: center;\" width=\"198\"><strong>Total Time (minutes)<\/strong><\/td>\n<td style=\"width: 26.8722%; text-align: center;\" width=\"122\"><strong>Full rebuild<\/strong><\/td>\n<td style=\"width: 184.263%; text-align: center;\" width=\"131\"><strong>Single file change<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 43.6123%; text-align: center;\" width=\"198\">VS2017 15.9.4 \/debug:<strong>fastlink<\/strong><\/td>\n<td style=\"width: 26.8722%; text-align: center;\" width=\"122\">4:22<\/td>\n<td style=\"width: 184.263%; text-align: center;\" width=\"131\">1:39<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 43.6123%; text-align: center;\" width=\"198\">VS2019 16.8\u00a0\u00a0\u00a0 \/debug:<strong>full<\/strong><\/td>\n<td style=\"width: 26.8722%; text-align: center;\" width=\"122\">3:40<\/td>\n<td style=\"width: 184.263%; text-align: center;\" width=\"131\">1:15<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 43.6123%; text-align: center;\" width=\"198\"><em>x times faster <\/em><\/td>\n<td style=\"width: 26.8722%; text-align: center;\" width=\"122\">1.19<\/td>\n<td style=\"width: 184.263%; text-align: center;\" width=\"131\">1.32<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 43.6123%; text-align: center;\" width=\"198\"><strong><em>average x times faster<\/em><\/strong><\/td>\n<td style=\"width: 26.8722%; text-align: center;\" width=\"122\"><strong>1.26<\/strong><\/td>\n<td style=\"width: 184.263%; text-align: center;\" width=\"131\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><\/h4>\n<h4>Version 15.9.4 vs 16.8 using \/debug:full<\/h4>\n<p>In the second test, a comparison of builds using <em>\/debug:full<\/em> was done over 3 versions of Visual Studio. The compilation time has been improved by a factor of <strong>1.52. <\/strong>When doing a full rebuild, the compile time decreased from 4 minutes 39 seconds in Visual Studio 2017 to 3 minutes 5 seconds in Visual Studio 2019 16.8. For a single file change, a 19 second reduction was observed. On average, the link times improved by a factor of <strong>18.15X. <\/strong>The full rebuild link time in Visual Studio 2019 16.8 <strong>decreased by 10 minutes 18 seconds<\/strong>, a monumental improvement.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-compile.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27469\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-compile.png\" alt=\"Image FH compile\" width=\"1898\" height=\"1233\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-compile.png 1898w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-compile-300x195.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-compile-1024x665.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-compile-768x499.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-compile-1536x998.png 1536w\" sizes=\"(max-width: 1898px) 100vw, 1898px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<table style=\"width: 99.6422%; height: 333px;\" width=\"451\">\n<tbody>\n<tr style=\"height: 55px;\">\n<td style=\"width: 41.63%; height: 55px; text-align: center;\" width=\"189\"><strong>Compile Time (minutes)<\/strong><\/td>\n<td style=\"width: 29.0749%; height: 55px; text-align: center;\" width=\"131\"><strong>Full rebuild<\/strong><\/td>\n<td style=\"width: 193.392%; height: 55px; text-align: center;\" width=\"131\"><strong>Single file change<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 55px;\">\n<td style=\"width: 41.63%; height: 55px; text-align: center;\" width=\"189\">VS2017 15.9.4 \/debug:full<\/td>\n<td style=\"width: 29.0749%; height: 55px; text-align: center;\" width=\"131\">4:39<\/td>\n<td style=\"width: 193.392%; height: 55px; text-align: center;\" width=\"131\">0:55<\/td>\n<\/tr>\n<tr style=\"height: 55px;\">\n<td style=\"width: 41.63%; height: 55px; text-align: center;\" width=\"189\">VS2019 16.7.2 \/debug:full<\/td>\n<td style=\"width: 29.0749%; height: 55px; text-align: center;\" width=\"131\">3:31<\/td>\n<td style=\"width: 193.392%; height: 55px; text-align: center;\" width=\"131\">0:37<\/td>\n<\/tr>\n<tr style=\"height: 55px;\">\n<td style=\"width: 41.63%; height: 55px; text-align: center;\" width=\"189\">VS2019 16.8 \u00a0\u00a0\u00a0\/debug:full<\/td>\n<td style=\"width: 29.0749%; height: 55px; text-align: center;\" width=\"131\">3:05<\/td>\n<td style=\"width: 193.392%; height: 55px; text-align: center;\" width=\"131\">0:36<\/td>\n<\/tr>\n<tr style=\"height: 55px;\">\n<td style=\"width: 41.63%; height: 55px; text-align: center;\" width=\"189\"><em>x times faster<\/em><\/td>\n<td style=\"width: 29.0749%; height: 55px; text-align: center;\" width=\"131\">1.51<\/td>\n<td style=\"width: 193.392%; height: 55px; text-align: center;\" width=\"131\">1.53<\/td>\n<\/tr>\n<tr style=\"height: 55px;\">\n<td style=\"width: 41.63%; height: 55px; text-align: center;\" width=\"189\"><strong><em>average x times faster<\/em><\/strong><\/td>\n<td style=\"width: 29.0749%; height: 55px; text-align: center;\" width=\"131\"><strong>1.52<\/strong><\/td>\n<td style=\"width: 193.392%; height: 55px; text-align: center;\" width=\"131\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-link.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27471\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-link.png\" alt=\"Image FH link\" width=\"1901\" height=\"1177\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-link.png 1901w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-link-300x186.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-link-1024x634.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-link-768x476.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-link-1536x951.png 1536w\" sizes=\"(max-width: 1901px) 100vw, 1901px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<table style=\"width: 100.143%; height: 331px;\" width=\"451\">\n<tbody>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\"><strong>Link Time (minutes)<\/strong><\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\"><strong>Full rebuild<\/strong><\/td>\n<td style=\"width: 192.07%; text-align: center;\" width=\"131\"><strong>Single file change<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\">VS2017 15.9.4 \/debug:full<\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\">10:53<\/td>\n<td style=\"width: 192.07%; text-align: center;\" width=\"131\">11:28<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\">VS2019 16.7.2 \/debug:full<\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\">1:23<\/td>\n<td style=\"width: 192.07%; text-align: center;\" width=\"131\">1:39<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\">VS2019 16.8 \u00a0\u00a0\u00a0\/debug:full<\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\">0:35<\/td>\n<td style=\"width: 192.07%; text-align: center;\" width=\"131\">0:39<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\"><em>x times faster<\/em><\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\"><strong>18.66<\/strong><\/td>\n<td style=\"width: 192.07%; text-align: center;\" width=\"131\"><strong>17.64<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\"><strong><em>average x times faster<\/em><\/strong><\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\"><strong>18.15<\/strong><\/td>\n<td style=\"width: 192.07%; text-align: center;\" width=\"131\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27491\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total.png\" alt=\"Image FH total\" width=\"2156\" height=\"994\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total.png 2156w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total-300x138.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total-1024x472.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total-768x354.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total-1536x708.png 1536w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FH-total-2048x944.png 2048w\" sizes=\"(max-width: 2156px) 100vw, 2156px\" \/><\/a><\/p>\n<table style=\"width: 99.265%; height: 332px;\" width=\"451\">\n<tbody>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\"><strong>Total Time (minutes)<\/strong><\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\"><strong>Full rebuild<\/strong><\/td>\n<td style=\"width: 193.392%; text-align: center;\" width=\"131\"><strong>Single file change<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\">VS2017 15.9.4 \/debug:full<\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\">15:32<\/td>\n<td style=\"width: 193.392%; text-align: center;\" width=\"131\">12:23<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\">VS2019 16.7.2 \/debug:full<\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\">4:54<\/td>\n<td style=\"width: 193.392%; text-align: center;\" width=\"131\">3:40<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\">VS2019 16.8 \u00a0\u00a0\u00a0\/debug:full<\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\">3:40<\/td>\n<td style=\"width: 193.392%; text-align: center;\" width=\"131\">1:15<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\"><em>x times faster <\/em><\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\">4.24<\/td>\n<td style=\"width: 193.392%; text-align: center;\" width=\"131\">9.91<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 41.63%; text-align: center;\" width=\"189\"><strong><em>average x times faster<\/em><\/strong><\/td>\n<td style=\"width: 29.0749%; text-align: center;\" width=\"131\"><strong>7.07<\/strong><\/td>\n<td style=\"width: 193.392%; text-align: center;\" width=\"131\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2>Building Forza Motorsport<\/h2>\n<h3>Methodology<\/h3>\n<p>At Turn 10 Studios, the Forza Motorsport team used MSBuild\u2019s Structured Log Viewer to obtain build and compile times. Each of the times below are the result of an average over 4 runs. CL refers to cl.exe (MSVC Compiler) and Lib refers to lib.exe (Microsoft Library Manager). While Full Build indicates total time, Debug, CL, and Lib times were chosen to be showcased; each time was averaged individually.<\/p>\n<h3>Results<\/h3>\n<h4>Version 15.9 vs 16.7 Profile Build with \/debug:fastlink<\/h4>\n<p>When doing a full Profile build with \/debug:fastlink, we can see a moderate improvement in build time while link time has improved by a factor of <strong>1.96<\/strong>. Lib time has been decreased by <strong>9.34X<\/strong>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fastlink.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27473\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fastlink.png\" alt=\"Image FM fastlink\" width=\"1653\" height=\"992\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fastlink.png 1653w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fastlink-300x180.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fastlink-1024x615.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fastlink-768x461.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fastlink-1536x922.png 1536w\" sizes=\"(max-width: 1653px) 100vw, 1653px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<table style=\"width: 98.6891%; height: 221px;\" width=\"597\">\n<tbody>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\"><strong>Time (seconds)<\/strong><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\"><strong>Full Build (Profile)<\/strong><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\"><strong>Debug Fastlink<\/strong><\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\"><strong>CL<\/strong><\/td>\n<td style=\"width: 138.806%; text-align: center;\" width=\"101\"><strong>Lib<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\">VS2017 15.9<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">285.5<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">18<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">38.9<\/td>\n<td style=\"width: 138.806%; text-align: center;\" width=\"101\">43.9<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\">VS2019 16.7<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">249.75<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">9.2<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">40.5<\/td>\n<td style=\"width: 138.806%; text-align: center;\" width=\"101\">4.7<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\"><em>x times faster <\/em><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">1.14<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">1.96<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">0.96<\/td>\n<td style=\"width: 138.806%; text-align: center;\" width=\"101\">9.34<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Version 15.9 vs 16.7 Profile Build with \/debug:fulllink<\/h4>\n<p>Using \/debug:fulllink, we can see much more favorable numbers. Full build time is now <strong>1.71X<\/strong> faster. Similarly, link time has been improved by a factor of <strong>4.95<\/strong>. Lib time was also improved by <strong>10.86X<\/strong>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fulllink.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27474\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fulllink.png\" alt=\"Image FM fulllink\" width=\"1653\" height=\"993\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fulllink.png 1653w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fulllink-300x180.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fulllink-1024x615.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fulllink-768x461.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-fulllink-1536x923.png 1536w\" sizes=\"(max-width: 1653px) 100vw, 1653px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<table style=\"width: 99.2714%;\" width=\"597\">\n<tbody>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\"><strong>Time (seconds)<\/strong><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\"><strong>Full Build (Profile)<\/strong><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\"><strong>Debug Fulllink<\/strong><\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\"><strong>CL<\/strong><\/td>\n<td style=\"width: 135.323%; text-align: center;\" width=\"101\"><strong>Lib<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\">VS2017 15.9<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">431<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">172<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">34<\/td>\n<td style=\"width: 135.323%; text-align: center;\" width=\"101\">38<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\">VS2019 16.7<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">251.75<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">34.75<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">34.75<\/td>\n<td style=\"width: 135.323%; text-align: center;\" width=\"101\">3.5<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\"><em>x times faster <\/em><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">1.71<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">4.95<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">0.98<\/td>\n<td style=\"width: 135.323%; text-align: center;\" width=\"101\">10.86<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><\/h3>\n<h4>Version 15.9 vs 16.7 Release Build<\/h4>\n<p>For the Release Build, we see similar improvements as above. Build time decreased by <strong>1.81X<\/strong> and link time improved by a factor of <strong>2.44<\/strong>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-release.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27475\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-release.png\" alt=\"Image FM release\" width=\"1653\" height=\"993\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-release.png 1653w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-release-300x180.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-release-1024x615.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-release-768x461.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/FM-release-1536x923.png 1536w\" sizes=\"(max-width: 1653px) 100vw, 1653px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<table style=\"width: 99.4975%;\" width=\"597\">\n<tbody>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\"><strong>Time (seconds)<\/strong><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\"><strong>Full Build (Release)<\/strong><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\"><strong>Link<\/strong><\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\"><strong>CL<\/strong><\/td>\n<td style=\"width: 135.821%; text-align: center;\" width=\"101\"><strong>Lib<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\">VS2017 15.9<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">664<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">479<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">30<\/td>\n<td style=\"width: 135.821%; text-align: center;\" width=\"101\">34.5<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\">VS2019 16.7<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">367<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">196<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">29<\/td>\n<td style=\"width: 135.821%; text-align: center;\" width=\"101\">29<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.2172%; text-align: center;\" width=\"139\"><em>x times faster <\/em><\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">1.81<\/td>\n<td style=\"width: 21.393%; text-align: center;\" width=\"128\">2.44<\/td>\n<td style=\"width: 16.9154%; text-align: center;\" width=\"101\">1.03<\/td>\n<td style=\"width: 135.821%; text-align: center;\" width=\"101\">1.19<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><\/h2>\n<h2>Analysis<\/h2>\n<p>The significant build iteration time improvement is a direct result of optimization efforts by the C++ Team. Linker performance was improved in version 16.0 and 16.2 by <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/game-performance-and-compilation-time-improvements-in-visual-studio-2019\/\">speeding up Program Database (PDB) file generation and type merging<\/a>. Algorithmic changes in 16.6 and worse case Incremental Linking improvements in 16.7 <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/faster-c-iteration-builds\/\">increased optimization of Linker performance<\/a>. \u00a0In version 16.8, multi-threading generation of PDB files further improved performance. Stay tuned for a technical blogpost detailing 16.8 improvements.<\/p>\n<h2>Developer Conversation<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-27467\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish.jpg\" alt=\"Image ForzaHorizon4 E3PressKit WM 11 ClassicBritish\" width=\"2235\" height=\"1258\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish.jpg 2235w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish-300x169.jpg 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish-1024x576.jpg 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish-768x432.jpg 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish-1536x865.jpg 1536w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2021\/01\/ForzaHorizon4_E3PressKit_WM_11_ClassicBritish-2048x1153.jpg 2048w\" sizes=\"(max-width: 2235px) 100vw, 2235px\" \/><\/a><\/p>\n<p>We spoke with <strong>Andrew Sage<\/strong> <strong>from Playground Games<\/strong> (Forza Horizon 4) and <strong>Dan Tunnell<\/strong> <strong>from Turn 10 Studios<\/strong> (Forza Motorsport) for some insights into how the improvements have affected their studios.<\/p>\n<p>Is the studio currently using Visual Studio 2019?<\/p>\n<blockquote><p>\u201cWe have a mix of VS2017 and VS2019, depending on setup. Most engineers have moved to VS2019 for the main project, but we still have some tools projects that haven\u2019t been updated yet and are still using 2017.\u201d \u2013 Andrew<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote><p>\u201cWe just moved the whole studio to Visual Studio 2019 in the last week of January 2021.\u00a0 We&#8217;ve had one of our development branches running it since before the holidays but it just reached broad adoption a couple of days ago.\u201d \u2013 Dan<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>What were some immediate benefits that you saw from faster link times?<\/p>\n<blockquote><p>\u201cReducing iteration time to build and test changes allows us to be more productive, especially as gains add up over the course of all of the engineers multiple times per day. The main benefit was the removal of stalls when debugging with fast link when switching to full link, as these would add 30-45 seconds per debug session, which can be repeated multiple times per build.\u201d \u2013 Andrew<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote><p>\u201cThe biggest benefit I see is improved iteration time.\u00a0 Even if we only shave 30 seconds off link time, multiplying that by the number of devs in the studio and the number of times they compile each day becomes a large number really quick.\u201d \u2013 Dan<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>What are some potential long-term benefits?<\/p>\n<blockquote><p>\u201cLonger term, we will also be moving all our automated build servers over to Visual Studio 2019 to reduce our build validation and test turnaround times. This means a reduction in time from checking in code to knowing that the build has succeeded. Also, there will be less changes per build as these builds run continuously. Moving all our tools projects over to Visual Studio 2019 in the future would lead to a further productivity benefit for the tools team, and their ability to spend more time supporting our content creators.\u201d \u2013 Andrew<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote><p>\u201cOne of the longer-term benefits is reduced build times on our server farm.\u00a0 If someone checks in code that breaks the build, the faster we catch it the less downtime we experience.\u00a0 It also gives us faster tooling iteration since the time between a developer checking in new tooling code and the build system checking in new tools binaries is reduced.\u00a0 Additionally, there&#8217;s reduced time for &#8220;validation&#8221; builds.\u00a0 Prior to checking in, each developer builds a representative sample of the game binaries to ensure that they haven&#8217;t broken anything.\u00a0 This slows iteration (I&#8217;m sure you can see a pattern emerging &#8211; iteration time is king) and anything we can do to speed that up is extremely valuable.\u201d \u2013 Dan<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>How might the link time improvements change the workflow patterns of the studio?<\/p>\n<blockquote><p>\u201cBesides the improvement in focusing on fixing issues rather than waiting for builds to complete across the team, I think we will be able to focus on other productivity gains which then become a larger overall proportion of our processes. For instance, reducing dependencies in our codebase can improve build times even with the faster toolset and distributed build systems, and we will continue to focus our efforts in this area in the future. Also, using full link allows for less mental \u2018task switching\u2019 overhead caused by the stalls, as often when someone hits a stall they might swap to another task for a bit and then back in later, which can cause workflow to become interrupted.\u201d \u2013 Andrew<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote><p>\u201cIf I were to guess, I&#8217;d say that we&#8217;ll see less build breaks.\u00a0 Validation builds take a significant amount of time to complete.\u00a0 Even though they&#8217;re required, sometimes developers will omit that step if they&#8217;re in a hurry and feel confident that their fix is trivial enough to be safe.\u00a0 The faster the build times are the lower that barrier to entry is and the more likely people will perform that step even for changes they consider to be trivial and\/or safe.\u00a0 I also think we might see less code changes between compilations.\u00a0 The longer compilation and linking takes the more code a developer will add before they hit the button to compile.\u00a0 If compilation and linking is almost instantaneous, most developers will use that as a quick sanity check to verify that the method\/function\/class\/etc. that they just added compiles before moving on.\u201d \u2013 Dan<\/p><\/blockquote>\n<h2>Upgrade Visual Studio<\/h2>\n<p><a href=\"http:\/\/aka.ms\/vspreview\">Download the latest Visual Studio 2019 Preview<\/a> and experience faster end-to-end build iteration times for your own projects.<\/p>\n<p>How will these improvements impact your day-to-day workflow? Talk to us in the comments below, on <a href=\"https:\/\/twitter.com\/VisualC\">Twitter (@VisualC)<\/a>, or via email at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The C++ team at Visual Studio has delivered substantial compile and link time improvements throughout Visual Studio 2019. Playground Games and Turn 10 Studios shares their link time improvement wins.<\/p>\n","protected":false},"author":39811,"featured_media":27478,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3927,218],"tags":[77,3884,140,3885,331,110,3883,3887,25,3886],"class_list":["post-27464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-game-development","category-performance","tag-build-throughput","tag-build-time","tag-c","tag-compile-time","tag-game-development","tag-games","tag-gaming","tag-iteration-time","tag-linker","tag-video-games"],"acf":[],"blog_post_summary":"<p>The C++ team at Visual Studio has delivered substantial compile and link time improvements throughout Visual Studio 2019. Playground Games and Turn 10 Studios shares their link time improvement wins.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/27464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/39811"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=27464"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/27464\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/27478"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=27464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=27464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=27464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}