Blogging Ottinger (tim)

2008-June-26

Slow builds & copy operations

Filed under: Angst, Windows, Programming

I’m working with some legacy code now, C# in Visual Studio 2005. The whole TDD thing is greatly hampered by slow builds. Today I investigated a bit. I captured the build log and sorted it, then removed duplicates. I then used vimdiff to compare the sorted file against the sorted, unique file.

It turns out that 8 minutes of my time is being wasted by 4760 file copy operations, all of them moving files from one bin/debug directory to another. This happens whether or not a file has changed, and whether I’m building the whole solution or just a small subproject.

I looked into the sln (solution) file and saw nothing that I can modify there. I then went to the .csproj files to see if I can modify the timing of the copy so that it only happens when something changes. It’s not explicitely there.

If I can remove the 8-minute overhead from my builds (most of which involve changes to one or two files in a subproject) then I can do TDD.

Otherwise we’re in a valley of despair: if the build were longer, we could do meaningful work while waiting. If it were shorter, we wouldn’t be wasting so much time and wouldn’t be hesitating to build/test. It is long enough to be daunting and short enough not to be worth a context switch.

Maybe there’s an msbuild expert in the readership of my blog?

Comments »

The URI to TrackBack this entry is: http://tottinge.blogsome.com/2008/06/26/979/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com