The building takes a lot of time. How to deal with this?

Speaking of compiled languages ​​(C # in my case), I think that the problem would always remain, no matter how efficient your development machine is. The build time may be more or less depending on the specific environment, but often this is enough for your attention to want to move from your task to something else, for example, stackoverflow, youtube, twitter, etc., And it is just very annoying .

I'm glad for the Java developers because of loading the dynamic Java class, but what can .net (and others) developers do to make the build process less painful and annoying?

+4
source share
7 answers

The remark in your question about one attention that wanders out of the task reminded me of this Joel on Software post.

So investing in solid state drives (since I assume that you are talking about the build process in the dev block during development and debugging) can help.

Besides, making your computer faster won't hurt at all, right? :)

+1
source

We use several assembly configurations to compromise between speed and complex assembly.

Complete assembly requires a lot of time, such as FX cop analysis, ASP.NET compilation, all unit test projects, preliminary generation of the Entity Framework view, etc.

"Quick build" usually takes only a few seconds, and those that are minimal to start the project.

Developers switch between full assembly and quick assembly throughout the entire workflow as needed.

+8
source

No need to create class files as well? Wouldn't that put the workload in working hours, as opposed to compile time? It's not a difference, is it? Of course, the more software grows, the more time it takes to create it, depending on the machine, and not on the language or structure - this is a compromise for things like strong typing, interpreted bytecode (or binary code depending on the language / compiler) instead of the interpreted source code at each start (as you have with php and python, etc.). I do not think java will significantly improve the situation, you will need to create your application.

I think that in comparison with C and C ++, both C # and java have significantly improved in terms of compilation time.

Just use your time to relax:

Compiling

a source

+4
source

Some things to try:

  • Defragment a disk containing source code

  • Exclude source folders from antivirus scanner

  • Exclude source folders from Windows Search Indexer

  • Disable all extensions of Visual Studio that you are not using.

+3
source

In addition to many other suggestions for a faster machine, remove unnecessary projects from your solution, etc., consider Visual Studio 2010 + a multi-core machine. VS2010 can use all your kernels when building. Check out this thread to find out how to install it.

+1
source

Do you reconnect every time or do you have everything in one assembly? I work with fairly large projects, and my build time is not that long. I have several assemblies, and I change only a few times every time I make changes to the project.

If you find yourself modifying assemblies everywhere, you can try reorganizing your code structure. Or maybe you didn’t take your time for unit tests? They not only help you in testing, but also improve the structure of the code (it is difficult to test applications with a lousy design).

Another alternative is to use tools that speed up the build, for example: http://www.xoreax.com/

+1
source

I worked on very large C # projects and rarely saw Debug build time exceed 2 minutes.

What usually takes time is things like static analysis (like fxcop), unit tests, code signing (when using the code notation service), etc. The easiest way to keep them under control is to either restrict them to release assemblies, or to have a separate assembly definition for Full Assembly and exclude these steps from your Debug and Release collections.

If this is not your problem, look at the performance of your computer, as others have said. Fragmentation, slow disk assemblies, antivirus, etc.

+1
source

All Articles