|
We are(were) experiencing about a 5 second delay in msbuild startup, between the copyright banner and the first output. I tracked it down today and came up with a simple repro. It appears that an ItemGroup element will do the search on disk before examining conditions. If conditions are false, then the search is discarded, but on our build tree each search of the tree is a couple of seconds, and we had a couple of different searches going on at startup. Looking further I find that if I put the ItemGroup inside a target it works like It should. The following sample takes 2 seconds to run on my quad core, but if the ItemGroup is moved inside a target it's a qtr of a second. Running Win2k3 Sp2 Server x64 EE , .net 3.5 sp1. Others have reproduced on various XP's etc so don't think it's a particular machine issue. <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="3.5" > <Target Name="Build" > <Message Text="Hello world @(ProjectFiles)" /> </Target> <ItemGroup Condition="'n' == 'y'"> <ProjectFiles Condition="1==2" Include="l:\**\msbuild.*.proj" /> </ItemGroup> </Project>
- Edited bySteve Dillon Wednesday, September 02, 2009 10:23 PMFIx OS description
-
|