How can I measure compilation/built time in Visual Studio 2010? Have any advices how can I speed up compilation process?
This SO answer suggests a way of showing the build time in the output window for each build.
To both improve and measure build time you could use a product like Incredibuild.
It is a distributed build tool that uses idle cycles from pc's on your network to improve build times. I worked at a games development company a few years ago who used it and managed to reduce build times from roughly 35 minutes to under 5 minutes.
Note that this is not a free product.
Below is a screenshot showing how this tool integrates with VisualStudio. The muti-coloured bars show which computer is building the code for you, what they are building and the time it is taking them (errors are always shown in red).
Related
I have a .Net Standard 2.0 project, when I try to build it using the command line (dotnet CLI) or VS (20017 v15.7.4) it took a long time to compile and CPU usage will rise to upper than 98%.
Is there any way for me to find out why that process is using too much CPU and where is CPU leak?
Have you cleaned your application? it seems your using Visual Studio which should have a Clean solution type button. I would recommend trying that, as well as restarting your computer to see if it speeds up the compile time.
Otherwise I would set up some timers in your code, and try to investigate which area of your code is making the application compile for an excess amount of time. Once you discover that you can try to improve the performance of that section.
The Performance and Diagnostics Hub in Visual Studio is an amazing feature. I use it for diagnosing Memory and high cpu issues while writing code. However, so far I am not able to figure out how to use this tool for troubleshooting low-cpu hang scenarios (or wall-clock analysis). Let's say my application takes long time on waiting a response back from a network or file I/O. Is there anyway of determining this from the Diagnostics windows in Visual Studio during a debugging sessions? I was hoping this analysis could be part of CPU Analysis section in there.
Like this blog here:
https://blogs.msdn.microsoft.com/devops/2014/02/28/new-cpu-usage-tool-in-the-performance-and-diagnostics-hub-in-visual-studio-2013/
The CPU Usage tool measures the CPU’s resources in terms of how much time each core in the CPU spends executing your code, it seems that it didn't provide the feature to resolve/collect the low-cpu hang issue.
Maybe you could think about using other tool like the PerfView or the suggestion of magicandre1981.
https://blogs.msdn.microsoft.com/vancem/2012/11/26/wall-clock-time-analysis-using-perfview/
Currently we have a VS2010 solution with 40+ projects and all the team works on pretty slow virtual machines(2 GHz proc + 1.75GB RAM). Working in this conditions is pretty hard, because usually build from visual studio even of 7-8 projects takes near 10 minutes. We are waiting for the new VMs but I don't expect that they will be much faster. Are there any workarounds to make a development process faster?
The only way I see now is to split one solution into several smaller solutions.
If you're only working on a few of the 40+ projects, unload the ones you're not using.
Right click the project in Solution Explorer -> Unload Project
You can read this blog post for more details.
I wanted to write a small app that would sit in my taskbar and monitor what Visual Studio was doing all day. Specifically, what I really want to figure out is how long I spend waiting on Visual Studio to build my solution each day.
Could someone point me in the right direction. Is there something in the Visual Studio SDK that would help?
Since this is just for curiosity, I'd go with an easy option...
One potential would be to just make a pre-build and post-build script for your project, and log the start/stop of your build times.
You could then just parse the log and figure out the total time.
If the machine is only (or mostly) used for development, you could record the CPU time used by the idle thread in the Task Explorer at the start and the end of the day. Comparing the difference to the wall clock time will give you the total CPU used.
My solution is to copy the build log into a new text file within VS, search for Time Elapsed within the file, copy all the occurrences into excel select the cell under the build times for each of the projects and press the Sigma symbol to add them all. It takes 15s to do :-)
I wanted to know if it is possible to know why a Visual Studio 2005 (MSBuild) build is taking a long time to build a project.
Suddenly we are getting 7-minute build times on some computers, while others take less, such as 4 minutes.
So I think I need to identify changes that were made to the project and are causing a longer build time.
Any ideas on how I can do that?
Take a look at MSBuild Profiler to analyze where the slow down is. Based on that information, dig into what each task is doing and factor in the things that Chris mentions in his answer.
Is it a C++ project? I had the same problem when I moved my project from Visual Studio 6.0. Turning off the Code Optimization did save a lot of time. It was almost impossible to work with activated Optimization.
It re-evaluates the references on every build. If any of your references are on network drives that could be slowing it up.
Some computers are naturally going to perform builds faster than others.. This is, in part, a function of processor, ram, and HD speeds.
Regarding why you see 7 minute build times there could be any number of reasons. Amount of code in project(s). Number of projects in solution. Amount of post / pre build steps. Speed of network in downloading anything from source control it needs. Number of other processes running on your computers. Amount of RAM and other resources available to perform the builds..
You get the idea.