Question

We have always seen that the build operation of visual studio takes much time as the nested folders in visual studio class libraries and any kinds of templates grows. I just moved several class in a my project to another folder and got this warning by Resharper: Opening so many file may cause server performance penalty. so I want to know how really visual studio deals with these folders in compile time, does it really cause any performance penalty?

Was it helpful?

Solution

The warning from ReSharper has nothing to do with compile time. When you perform a refactor with ReSharper, you can have ReSharper open all the files, which allows for easy undo - you can use Visual Studio's undo command to remove the changes from all of the open files. However, if the refactor affects a lot of files, that means ReSharper has to tell Visual Studio to open a lot of files, and that can be slow. So ReSharper shows the warning.

Alternatively, you can tell ReSharper not to open the files. This can be quicker, but also means that you can't undo the change - you'd have to do the refactor in reverse.

I have never seen the use of folders cause slowdowns in compiles. Adding files will, of course, slow the compilation down, because the compiler is processing more files. The fact that they live in nested folders shouldn't make any difference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top