{"id":493,"date":"2018-01-12T16:34:42","date_gmt":"2018-01-13T00:34:42","guid":{"rendered":"http:\/\/www.icetips.com\/blog_wp\/?p=493"},"modified":"2018-09-19T10:54:00","modified_gmt":"2018-09-19T17:54:00","slug":"improve-performance-when-compiling-with-build-automator","status":"publish","type":"post","link":"http:\/\/www.icetips.com\/blog_wp\/2018\/01\/12\/improve-performance-when-compiling-with-build-automator\/","title":{"rendered":"Improve performance when compiling with Build Automator"},"content":{"rendered":"<p><strong><a href=\"http:\/\/www.buildautomator.com\" target=\"_blank\">Build Automator<\/a><\/strong> uses MSBuild to compile projects and solutions no matter if they are in Visual Studio or in Clarion.\u00a0 By default, MSBuild is a single thread program, but there is a way to tell it to start multiple processes to compile.<\/p>\n<p>After some experiments on a virtual machine, I'd say it's definitely worth it to try it out and see if it helps.\u00a0 What you need is the \/maxcpucount\u00a0parameter which you can add to the \"Additional Parameters\" tab on the \"Call MS-Build\" action in Build Automator.<\/p>\n<p><a href=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2018\/01\/2018-01-12_16-08-40.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-495\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2018\/01\/2018-01-12_16-08-40.png\" alt=\"Compile with MSBuild\" width=\"542\" height=\"508\" srcset=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2018\/01\/2018-01-12_16-08-40.png 542w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2018\/01\/2018-01-12_16-08-40-300x281.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/a><\/p>\n<p>The benefit may not be as much as you had hoped for, but it definitely does improve performance.\u00a0 Here are some numbers.\u00a0 This was tested on a Windows 10, 64bit virtual machine in VMWare 12.5.\u00a0 It is set up with 5.7GB of RAM.\u00a0 In the first test it was set to use 1 CPU and 2 cores.<\/p>\n<table width=\"250\">\n<tbody>\n<tr>\n<td style=\"text-align: right;\" width=\"50\">15:42:59.898<\/td>\n<td width=\"50\"><\/td>\n<td width=\"100\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">15:45:54.809<\/td>\n<td style=\"text-align: right;\">00:02:54.911<\/td>\n<td>\u00a0without \/maxcpucount<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">15:33:22.832<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">15:36:04.000<\/td>\n<td style=\"text-align: right;\">00:02:41.168<\/td>\n<td>with \/maxcpucount:2<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">15:52:48.811<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">15:55:21.083<\/td>\n<td style=\"text-align: right;\">00:02:32.272<\/td>\n<td>\u00a0with \/maxcpucount:8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In this test, I was able to shave off about 38 seconds with the 8 CPU setting.\u00a0 Your milage\u00a0may certainly wary as this may be different outside of virtualized environment and it may be different depending on what CPU you have and a lot of other configurations.\u00a0 No errors were reported and everything seemed to compile correctly.<\/p>\n<p>All generated files were destroyed before each test and ClarionCL.exe was used to generate.\u00a0 The Clarion IDE was not involved at all in this process and was closed while the testing was performed.\u00a0 Only command line utilities.<\/p>\n<p>Bottom line is if you are compiling larger solutions with Build Automator, then you should check out the \/maxcpucount\u00a0parameter.\u00a0 For more information about this parameter, please see the information on the\u00a0<a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/bb651793.aspx\" target=\"_blank\">MSDN Website<\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_493\" class=\"pvc_stats all  \" data-element-id=\"493\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Build Automator uses MSBuild to compile projects and solutions no matter if they are in Visual Studio or in Clarion.\u00a0 By default, MSBuild is a single thread program, but there is a way to tell it to start multiple processes to compile. After some experiments on a virtual machine, I'd say it's definitely worth it <a href=\"http:\/\/www.icetips.com\/blog_wp\/2018\/01\/12\/improve-performance-when-compiling-with-build-automator\/\" class=\"more-link\">...continue reading <span class=\"screen-reader-text\">Improve performance when compiling with Build Automator<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_493\" class=\"pvc_stats all  \" data-element-id=\"493\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[17,4,5],"tags":[67,220,221],"class_list":["post-493","post","type-post","status-publish","format-standard","hentry","category-clarion-10","category-products","category-technical","tag-build-automator","tag-msbuild","tag-performance"],"_links":{"self":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":7,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/493\/revisions"}],"predecessor-version":[{"id":504,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/493\/revisions\/504"}],"wp:attachment":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/media?parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/categories?post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/tags?post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}