vb.netvisual-studioperformanceprojects-and-solutions

Visual Studio & compile performance issues for large number of files


Our current solutions/projects have several classes combined into one file, I'm told this was done due to the slow compile times in VS.

Is this a confirmed problem and solution?

Can we break these apart now that we are using VS2008 Team system? Has anyone else separated the classes into different files and still had good performance?


Solution

  • I work on the VB.Net IDE team and I can tell you that putting everything in 1 file will make VS run slower, not faster. VB.Net works just fine with classes in different files.

    The only time this would ever make a difference is if you had an unbelievably slow hard drive, and files that were on very different parts of the physical disks (resulting in more and longer seek instructions). In general this shouldn't be a problem and for the VB.Net IDE this would only be a problem during initial startup. We have several layers of caching that would help eliminate even these types of problems.

    You may be able to discover some minimal benefits to this approach if you only consider the raw time it takes the command line compiler to operate. IMHO, the more important numbers are the respnosiveness of Visual Studio and the relative build time for Visual Studio. VS responsiveness will decrease if have extremely long files (which is what will eventually occur if you put ever class into a single file).