Visual Studio 2010 Prevent Build log polling - visual-studio-2010

I am running into a problem with viewing the build logs while a build is in progress.
The build is being run on a seperate (continious integration build) machine and we are using VS2010 and Team Foundation Server to manage the build from our development client machines.
The problem is that VS2010 will poll for the logs on the build server and update approx every 30 seconds. The solutions that are being built are pretty big and there are a lot of them. They generate a lot of warnings and logs at the moment which bloat the log considerably. Because of this it is nearly impossible to use VS2010 to view the build log until after the build has completed which is approx 85 minutes.
Obviously - a solution would be to fix up all the warnings, but I was wondering if there is a way to prevent the build log viewer from polling - just list all the detail until a 'refresh' is requested or even a way to extend the poll to say every 5 minutes would work for me.
I understand that the build log no longer gets written out to disk in VS2010 - so I can't access it unless I go through the Build Explorer.
Any thoughts would be very much appreciated!
Jay

It is possible, please have a look at this useful post written by Jason Prickett You will be able to change the polling interval by adding a DWROD 'ReportPollingInterval' at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation in the registery. Values to the DWord are assigned in milliseconds, so 30000 would mean 30 seconds.
Also consider installing VS 2010 SP1 on your machine, the SP1 has addressed a lot of performance issues with the build summary page.
Bounce back if you have any follow up questions.

Related

Visual Studio 2013 is idling at 40 percent CPU usage after upgrade to "Update 3"

I'm running Visual Studio 2013 that I use for rather basic MVC-5 web dev on a fairly ok Windows 8.1 machine and never encountered any real performance problems.
I installed Update 3 yesterday. Since then I can barely use the IDE anymore as it is idling at around 40% CPU usage and takes around 5 seconds to register that I actually typed something.
When I reboot my computer it might work for around a minute or so, but then it starts maxing out my CPU usage again without any special cause.
Is anyone aware of a problem with Update 3 that could cause this? How can I debug what's going on?
I've just had this happened to me -- CPU at 30% constantly. Restarted and closed solution to no avail. It was the massive GIT commit that was in the pipeline
Update: I started using SourceTree, the processing still happens but now I don't have to wait for so long for the git sync to occur.
I figured out my problem and it's to do with how we have our solution setup.
We have a very large solution and one of the projects is actually a "Web site" project. We have this because we wanted a project in our solution which is used purely to edit html, css, js files and we use grunt to build these files into our main web app project. A "web site" project is really the only way we could get VS to just list files to edit without building a DLL for that project. To do that we had to manually add a website project to the .sln file.
This has worked for us in the past but now with Update 3 it's killing the CPU even when VS is just idling. I removed this website proj from our sln file and the CPU is back to normal.
This is probably an edge case scenario but if you have a website project in your sln file along with other projects like class libraries and web apps, then this is probably your CPU issue. I haven't tested whether or not just having a normal website project open also has the same CPU issues (it might actually just be a problem with websites, not sure)
Update:
I opened just the folder structure we have for these html,css,js files as a standalone website in vs and CPU was through the roof even when idle. So I think the problem is just website projects in VS themselves.

inital connection to TFS very slow

We're running TFS 2010 on a dedicated machine. The SQL db is also running on the same machine so there is no external LAN/WAN access there.
When we check in/out or get anything from TFS - the initial connection and any connections after some inactivity from VS is extremely slow, sometimes up to 1 or 2 minutes. Once it does whatever it has to do, things start run fast and move along with no problems whatsoever.
What/where should i check to find this bottleneck, or whatever it is that's turning off after inactivity ?
I think that it is similar to SQL Server Reporting services. When it is inactive for some time (20 min?) the worker process fall asleep and wake up time is rather long.
SSRS 2008 - Long delay after a period if inactivity, How to Speed up MS SQL Server Reporting Services SSRS on First Run. There should be similar setting for TFS webservices.
I suspect it is the traditional ASP.NET wakeup pipeline that you are running into. If you want to try out setting a scheduled task that runs PingTFS.exe then it will keep the site loaded so that you don't see this initial hit each time the TFS web services have cooled down.
You can find PingTFS.exe available from Neno Loje here: https://msmvps.com/blogs/vstsblog/archive/2011/03/02/how-to-ping-tfs-to-see-if-it-s-up-and-running.aspx
If that doesn't help, then it's likely the hardware in the environment. You definitely don't want to have too few of resources for your TFS environment. Let us know if the first suggestion doesn't work out.

VS 2008/AJAX Project Fails Under Stress

I've been working on a VB.NET/VS2008/AJAX/SQL Server project for over 2 years now without any real issues coming up. However, we're in the last week of our project doing some heavy stress testing and the project starts failing once I get about 150 simultaneous users. I've even gone so far as to create a stripped down version of the site which only logs in a user, pulls up their profile and then logs off. That still fails under stress. When I says "fails" I mean the CPU's are spiked and the App Pool eventually crashes. This is running on a Windows 2008 R2 duo quad server w/ 16 gig of memory. The memory never spikes but the CPU tops out.
I ran YSlow on the site and it pointed out that I needed to compress the .axd files, etc... I did that by implementing Gzip compression on everything but that's what got me to the 150 users. I run YSlow now and it says everything is "A".
I'm really not sure where to go from here. I'd be more than willing to share the stripped down version of the site for anyone to review. I'm not sure if it's the server, my code or the web.config.
I know it is a bit late but have you considered increasing the number of worker processes in the application pool of your site to form a web garden? You can do this on the IIS Manager.

Team foundation server 2010 - some setup question relating to performance

Setup TFS 2010 on a pretty oldish server (actually an oldish desktop machine running server 2003 - single core, pre Core2 P4 so outdated...)
I'm finding a first adding and first getting of a website with about 700 files is quite slow (over 20 mins already over a VPN line).
Once you do that, the checkin / checkout operations are reasonably ok.
One thing I haven't done yet is get one of the guys at work to make a change and for me at home to do a get latest. We were running VSS up to this and that operation used to be a killer!
Anyway, few questions:
1)We set it up as a basic installation on server 2008 express. Would there be any performance gain with full sql server 2008?
2) We have the option of moving the drive to a better core 2 machine that should be a lot faster - will that make any difference?
Or are we simply running into a typical slowness of TFS over a LAN (bearing in mind we as a team work mainly in the office but sometimes from home over VPN when the speed issue seems to get worse).
TFS in it self isn't slow. We run a TFS on a dedicated VM and with the other VM's on the actual server also taking up ticks, or TFS is decently fast and reliable. Even when checking in and out code, running reports etc... So maybe the 2 core machine would help, but your P4 shouldn't be that bad in running it. 700 Files should be fairly quick within a minute or so. I think its your VPN that makes it slow. Everyone knows how slow VPN's can be.
Just an update. We moved to a faster machine (since we were getting one anyway). The speed of the machine makes no difference.
The good news is, its only slow the first time you add a project to TFS or take it down from TFS.
Daily checkin / checkout is fine. Also, doing a get latest from home is much improved over VSS - it no longer does that horrible freeze while it spends 10 mins figuring out if files have changed.
It was worth the upgrade for this alone.

Do you have performance problems when you work on Visual Studio projects via a network share?

We have tremendous problems with Visual Studio (2008, if that matters) locking up and slowing down when accessing projects over a network drive. It can take several minutes to open a large Web site project through a mapped drive, and saving even a single file can take a minute or more.
I fired up Wireshark and watched the traffic. VS, it seems, requests massive amounts of files from the network -- there's an enormous amount of SMB traffic. I've done some research, and this traffic seems to stem from two situations.
VS has to have everything in its own process to provide Intellisense.
VS needs to have all the source in order to compile the project.
All the advice I've read seems to boil down to the same thing: work locally, not on a remote machine, then push your code to an integration server via source control.
This would sure solve our problems (VS is quite fast working locally), but what if you can't work locally? What if the project and the infrastructure required to run it is too large and complicated to be replicated on everyone's individual machines?
We've gone 'round this problem a couple times, and the only way we can figure to work on these projects is direct access via a mapped drive. However, the VS slowness and lockups are really becoming a problem.
One solution: we installed VS on the server and work on the projects directly on the servers via RDP. Seriously.
So, I ask:
What does everyone else do? Do you work via the network, or do you replicate projects locally? If remotely, do you suffer from VS performance issues.
We work locally and use SVN to keep all our code on the server.
I find VS 2008 quite slow working locally sometimes so I wouldn't fancy working on a network share.
Trying to compile over a network share is horribly slow using visual studio. Your start times will be bad as the intellisense database is regenerated. Each compilation has to go over the network multiple times. Linking takes forever.
If you need the output of your compilation on the network, I'd recommend doing your compile locally and defining a post-build command to copy the results to your share.
If, as you say, you cannot pull everything locally then I'd suggest your project is too big and needs to be broken up into more manageable chunks. For a multi-tier application, break it up by tier and invest in some form of continuous integration (e.g. CruiseControl) to automatically build individual pieces. In this way you can work locally on an particular piece and pull the pre-build portions from CI for the other pieces of the application.
I'm not terribly surprised that using VS to load projects over a network share has performance issues. VS (in any language) is constantly getting information from files in the project. Once you start loading this over a network you're at the mercy of the underlying network connection. All lags and access issues will directly translate into VS having an issue loading file contents.
I would advise copying the solution locally and using some form of source code control to sync the project on the share.
If the code is too complicated to install on everyone's machine, then don't put it on everyone's machine. Does everyone need to have everything in order to do productive work?
I have 79 projects in my solution that I work with. Several hundred thousand lines of code. I pull my source down everyday from TFS and build it; it's a lot of code, but it's a far better solution than trying to work over a network share.
A more legitimate situation of having the source code on a share is when one has a non-Windows host on which a (number of) virtual Windows machine is running.
I have this exact situation where my desktop machine (the host) is running Debian and I use VMware to run various virtual Windows machines (the guests), including one that has Visual Studio installed so that I can target Windows OS's. Having the source code on a Samba share on the host machine has the following pro's:
The source is not duplicated, so there is no way to confuse different copies while working on several virtual machines at the same time.
I have full control over the source from my preferred OS.
I can turn on and off any of the virtual machines, or roll back to a snapshot, without the risk of loosing changes.
I can build (etc.) from the same source on several machines without having to commit changes before the source fully tested (reason: I have to use Subversion <1.5).
The only problem with this setup is that Visual Studio (6,7,8,9) is painfully slow.
I have mounted the partition (on which the share lies) with "relatime" and this works in as far as the disk activity on the share moderate, but Visual Studio keeps the (virtual) network card occupied all the time.
Any solutions to this would be very appreciated.
I encountered similar problems everytime I worked (work = anything else then just copy / paste files) over a network drive. The problem occured with ZendStudio and Eclipse.
Why not use any kind of source control?
When working on Windows based projects I've always worked locally.
Once at a unix shop (AIX iirc) developers would work via NFS mount and checkin/checkout via RCS...
I'm using VS2005 across to a network share and not having any performance issues. However, it is a new server (Windows Server 2008). I don't have any other data points for VS since using it at work is relatively new for me.
However, some datapoints from using Netbeans for previous projects on a network share... Local build time for my project was 2 minutes on Vista, on a fast dual-core AMD 64-bit machine. For a network share project, on a Server 2003 box, it was 20 minutes. Building that same project from an ancient Tablet PC (1ghz, single core) running XP locally was around 5 minutes. Interestingly enough, the Tablet PC could build on the Server 2003 box in the same 5 minutes.
For those asking "why" on the network share. The network share is automatically backed up, archived, etc. Also, that way I can very easily look at the same projects from multiple machines without having to worry about pushing back into the repository, etc. Once you've gone to having your dev stuff on a device where you can get to it from anywhere/anything, you'll never want to do local storage again!
I have performance problems via network anything, they just aren't good enough yet.
I thought it was common knowledge that disk-speed is one of the major "slowness" factors when it comes to using VS in Windows. Most dev machines I've built have had projects located on 10k RPM RAID0 drives, or at least a single 10k RPM drive. And even then it seems slow sometimes. Just the way it is, I suppose, until VS2009/VS2010 fixes it? :)
From my experience, this lag when working on a network share is 99% due to Intellisense. Disable it and you'll see.
disabling Intellisense indeed speeds up saving and opening files trough a UNC share dramatically
http://blogs.msdn.com/saraford/archive/2007/12/03/did-you-know-how-to-turn-off-intellisense-by-default.aspx
but then again, as stated in other comments, you might as well use a good text editor
I've also experienced the problems with performance mentioned above. It seems to vary from project to project, but I did find one way of speeding up performance significantly for some project types.
Following the advice in this article made a previously unusable project on a network location (it would take minutes to open one file) perform almost like a local project. The basic gist is that you need to grant FULL TRUST to the network location:
To grant permission to all your projects in your Visual Studio Projects folder located on the network, follow these 8 steps:
Open Microsoft .NET Framework 1.1 (or 2.0) Configuration which you'll
find under Administrative Tools in the Control Panel.
Expand Runtime Security Policy | Machine, | Code Groups | All_Code |
LocalIntranet_Zone In the right-hand pane, click Add a Child Code
Group.
In the dialog that follows choose Create a new code group and fill in
a Name like Visual Studio Projects.
Optionally, provide a Description for the Code Group. (You'll see the
description when you click a Code Group in the left tree, helping you
identify the various Code Groups you may have) .
In the Condition Type drop down, choose URL
For the URL field, type something like this:
file://YourServer/My Documents/Visual Studio Projects/*
Under Use existing permission set, choose FullTrust (that is, if you
trust your own applications. If you don't, choose a different
permission set or create a new one).
Not sure why this works, but it made a previously unusable NET 2.0 project perform significantly better.
Original article: http://imar.spaanjaars.com/364/how-do-i-allow-my-visual-studio-net-projects-to-run-from-a-network-location
I was having the same problem. I have a local copy of our build system, which expects certain drive letters, and was also experiencing slowness.
I have solved the problem by adding the following registry keys:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"R:"="\DosDevices\D:\devel\build
"S:"="\DosDevices\D:\devel\src"
Note that the double '\'s above are part of the .reg file format. When using regedit use single '\' throughout.
My build times were divided by 3. :)
I found the info in the wikipedia article on the SUBST command.

Resources