Wednesday 15 August 2012

compilation - Does having more projects in your visual studio increase compile time? -


Which scenario below will be compiled faster?

  1. Two projects inside a solution There are 5 classes in each project

  2. A project inside a solution. There are 10 classes in this project (a combination of two projects in the scenario)

Actually, I am trying to see if 2 projects in a solution compile time Will have an impact on

The compiler takes each class through context. The bottom layer (an internal project reference) should not be compiled first, then layers which refer to other internal projects, and so on. Therefore, yes, while compiling the compiler for sorting contexts and creating several binaries, there will be a slight increase in compilation time.

On the other hand, the biggest projects should be divided into several projects and namespace for ease of readability and navigation, it really depends on you, what you are doing, but you can add 1000 files single You can put multiple files in a file, or multiple files, or multiple files in a powerful way. The amount of time saved in compiled time (minimum) will not compare the time spent looking for things in a poorly prepared solution.

With the solution of 2 projects with 5 sections, compile time will be different from a single project of 10 squares, milliseconds. Linking and refinancing is the only real increase you'll see, and that's less.

EDIT: On another note, if you have a large project, you are not seeing a real difference in the compilation time, you probably have some kind of continuous integration (see) apply to the environment You should consider doing this, which will maintain the present form for you, as well as tell you something has broken.


No comments:

Post a Comment