Welcome to MSDN Blogs Sign in | Join | Help

VS 2005 SP1 Takes a While to Install

One of the most-reported feedback issues with Visual Studio 2005 Service Pack 1 Beta is about how long it takes to install. There are, unfortunately, a couple things that account for this and currently nothing we can do to prevent them. We have been considering options to at least inform the users what to expect when installing VS 2005 SP1, and I can tell you how you can decrease the amount of time it takes to install the patch.

As described in How Patching Works, a Windows Installer package is really just a relational database processed by a runtime, and Windows Installer patches contain transforms that change the in-memory view of that database and cause a product repair – either full or partial, depending on options passed during maintenance installations when the patch is applied. Considering that, patching a product and doing a full product repair or installing a patch that causes a full product repair (because it touches files in every feature) can take as long as installing the original product. VS 2005 SP1 does patch files in just about every feature, so it will take a while to apply.

However, there is another problem that exacerbates the amount time it takes to install such a large patch. Because VS 2005 SP1 is so large, it takes a long time – typically around 10 minutes – to load the entire image into memory in order to generate a hash over the image. This is done as part of a SAFER check that Windows Installer always performs to verify that a package can be installed. Take a look at a snippet of the verbose log generated while patching Visual Studio 2005 Team System – our largest SKU – with the VS 2005 SP1 main patch, which targets the non-Express, non-TFS Visual Studio SKUs for a single language:

MSI (s) (58:40) [04:28:57:387]: SOFTWARE RESTRICTION POLICY: C:\DOCUME~1\user\LOCALS~1\Temp\ZNW2EA\VS80sp1-KB918525-X86-Beta-ENU.msp has a digital signature
MSI (s) (58:40) [04:36:33:562]: SOFTWARE RESTRICTION POLICY: C:\DOCUME~1\user\LOCALS~1\Temp\ZNW2EA\VS80sp1-KB918525-X86-Beta-ENU.msp is permitted to run at the 'unrestricted' authorization level.

Over seven and one half minutes is spent mapping the entire file into memory and generating an image has over the mapped file. That log was generated on a pretty fast machine, too, and times will vary depending on the machine. Note that this is in the server context, where the installation actually occurs. If you double-click the downloaded file, for example, and install the patch in any UI mode this cost is doubled, as both the client and server perform a SAFER check. The server check is necessary because it always runs, but doing this check in the client context alerts the user earlier in UI modes that the patch cannot be installed due to policy (or error, such as when the SAFER check fails due to insufficient contiguous memory).

To reduce the amount of time it takes to install VS 2005 SP1, you can install it silently and reduce the cost of the SAFER check. Our patch wrapper accepts any command-line arguments you could pass to msiexec.exe, so you can choose from a variety of means to install the patch silently, such as the following:

> start /wait VS80sp1-KB918525-X86-Beta-ENU.exe /quiet /L*v+ VS80sp1-KB918525-X86-Beta-ENU.log

Logging is only an option, but is recommended in case other errors do occur. Additional logging options for the native wrapper and msiexec.exe are also available. Please be sure to attach logs to any bug reports.

Some have also noticed that the working memory set – hence memory requirements – are pretty hefty. The native wrapper is large and during extraction can require quite a bit of memory. Msiexec.exe which we shell out to in order to perform the install will also require a lot of memory during the SAFER check. Some spyware or virus scanning software will also attempt to load the file into memory, thus requiring additional memory. Temporarily disabling such software is recommended while installing large patches like VS 2005 SP1. Every package released from Microsoft goes through rigorous virus scanning and other checks before it is signed and published.

While there is nothing we can do about the time it takes through the SAFER check right now, there are things you can do documented above to reduce the time it takes. I am working on options for future products but really only the time through the SAFER check can be reduced. The time it takes to repair the product during patching installation and removal scenarios is proportional to the size of the product in terms of data to be written, and to how many files are patched.

Published Friday, October 06, 2006 2:18 PM by Heath Stewart

Comments

Sunday, October 08, 2006 10:49 PM by Norman Diamond

# re: VS 2005 SP1 Takes a While to Install

This looks like a place where it would be a good idea to make the patch start with a quick evaluation of the speed of the computer it's running on and then display a dialog: "This patch might require xx hours to install. [Next] [Cancel]" There is precedent for this in dialogs that estimate how much longer it will take to download a file through the internet. There's also ugly precedent where Windows Explorer takes 15 minutes to compute its estimate before it actually starts copying a big folder of stuff from one local drive to another local drive. Please don't take 15 minutes to compute your estimate. Anyway, I'll bet this would solve 95% of the complaints. People would know to cancel the installation now and start it again that evening to run overnight.
Tuesday, October 10, 2006 7:52 AM by ISerializable - Roy Osherove's Blog

# Installing VS 2005 SP1 Beta on Vista RC1

Installing Visual Studio 2005 SP1 Betaon Vista RC1 sounds like a common task until you figure out the

Tuesday, October 10, 2006 7:53 PM by TrackBack

# http://msmvps.com/blogs/theproblemsolver/archive/2006/10/09/installing-visual-studio-2005-sp1-beta.aspx

Friday, October 13, 2006 4:31 PM by Todd Abbott

# re: VS 2005 SP1 Takes a While to Install

I noticed that during the installer the CPU was running near 50% (hyperthreaded) for most of the install (about an hour).  This is somewhat perplexing since there was very little disk IO (monitored occationally with filemon) during that time sounds like very inefficient processing going on before the actual install.  I suppose this was the safer check listed here.

Also my logs were deleted after the install was finished as I just ran the EXE. :(

Friday, October 13, 2006 7:20 PM by David Slade

# re: VS 2005 SP1 Takes a While to Install

I noticed there was a period of time when there was no visual indication of anything happening apart from disk activity. Then later a progress bar that went to 100% done with zero minutes left, but it wasn't, it still went on for many more minutes. More accurate notification of progress would be nice.

Friday, October 13, 2006 7:54 PM by Fduch

# re: VS 2005 SP1 Takes a While to Install

Installing the patch took about 4 times more than to install VS2005 on AMD Athlon 64 3200+ with 2Gb of RAM.

Saturday, October 14, 2006 2:05 AM by Heath Stewart

# re: VS 2005 SP1 Takes a While to Install

Todd, the safer check does account for 20 minutes and there are other periods (not nearly as long) during the maintenance installation where Windows Installer reads the machine's current state (resulting in far less disk activity).

David, this period is most likely the native image generation and caching. This takes quite a long time and these custom actions - and most custom actions, really - don't report progress. This is a good suggestion for future products.

Saturday, October 14, 2006 8:09 AM by Christopher Yeleighton

# re: VS 2005 SP1 Takes a While to Install

My mileage: 20 hours to patch just Visual C++ with code analysis on Pentium III, 1.5 GB of free disk space required.

Monday, October 16, 2006 3:25 AM by Digby

# re: VS 2005 SP1 Takes a While to Install

"it takes a long time – typically around 10 minutes – to load the entire image into memory in order to generate a hash over the image".

Generating a hash is a sequential operation isnt it ? I.e. you dont need access to the entire image. Perhapes it be attempted in other ways - e.g. load parts of the image into memory at a time?

Monday, October 16, 2006 1:07 PM by Heath Stewart

# re: VS 2005 SP1 Takes a While to Install

Digby, you're right and the bug was fixed in Vista to stream the image in blocks, but in XP and 2003 the entire image is loaded.

Tuesday, October 17, 2006 1:00 AM by Maulik

# re: VS 2005 SP1 Takes a While to Install

Hi,

i'm trying to install the patch on windows vista, and have been waiting for more than 30 minutes but still the installer says preparing to install :-( .

Tuesday, October 17, 2006 10:05 AM by Heath Stewart

# re: VS 2005 SP1 Takes a While to Install

Maulik, as explained here it will take a while because of various security checks. In Vista, the situation is even worse as the entire image is loaded into memory even before the UAC prompt, then mapped as necessary and the code executed.

In Vista where the bug described at http://blogs.msdn.com/heaths/archive/2006/08/23/Size-does-Matter.aspx is fixed so that the entire image isn't loaded into memory at once, it is still streamed in blocks and can possibly take as long.

There are a lot of fixes in this SP and so it is very large and will take a while to install.

Wednesday, October 18, 2006 6:17 AM by Goanna

# Looks like your service pack needs a service pack

- VS 2005 SP1 Tries to Install Multiple Times

- VS 2005 SP1 Requires a lot of Disk Space

- VS 2005 SP1 Takes a While to Install

Thursday, October 19, 2006 12:05 AM by dude

# re: VS 2005 SP1 Takes a While to Install

As SP1 touches every file....

Simple solution, provide a new release, as the existing VS 2005 is crap anywa, so why bother trying to fix 100% of it..

Create a brand new install!!!

Not sure why this is not obvious...

After all this is exactly what MS did with vs 2002, vs 2003 is vs 2002 sp1!!!

Thursday, October 19, 2006 11:12 AM by drivard

# re: VS 2005 SP1 Takes a While to Install

If you are doing verbose logging, your install time will balloon.  For example, our application normally takes 2-5 minutes to install. if we turn on verbose logging, that time blows up to 25 minutes or more, depending on the machine.

Turn off the logging and the times should drop considerably.

Thursday, October 19, 2006 12:52 PM by Heath Stewart

# re: VS 2005 SP1 Takes a While to Install

What drivard is recommending means that if any errors installing the SP occur, it will be very difficult and most often impossible to determine why installation of the SP failed. Verbose logs are required to solve actual installation problems with the SP, so if you turn off logging to save 25 minutes and encounter a problem, you will have to re-enable verbose logging before the vast majority of problems can be diagnosed.

Use caution and weigh your options carefully to consider whether saving 25 minutes (typically half the time to install SP1) is worth having to start over to enable verbose logging (so the typical 50 minutes plus the original 25).

Wednesday, October 25, 2006 7:48 AM by Jesper

# re: VS 2005 SP1 Takes a While to Install

You may be right that there is "nothing you can do to prevent" the insane time it takes to install..... Except, possibly patching in a more efficient manner. Or maybe even letting the user choose whether to perform that 20-minute hash check to begin with. I mean, I've installed quite a lot of 400+ MB patches that magically didn't take ages.

Perhaps someone at Microsoft just need to rethink whether this is the correct way of applying a patch, instead of merely explaining away why it takes so long as "something we can't change"

Just a suggestion. :)

Wednesday, October 25, 2006 8:25 AM by graham

# re: VS 2005 SP1 Takes a While to Install

So it takes ages to install on a machine with a amd 2400 installed not reccomeneded for laptops

Wednesday, October 25, 2006 11:59 AM by Heath Stewart

# re: VS 2005 SP1 Takes a While to Install

Jesper, as explained in this post that 20 minute hash check is done unconditionally by Windows Installer itself, which is a runtime that processes and installs our patch. It can also be reduced to 10 minutes by running the patch silently, passing /quiet to the command line to the patch executable.

Saturday, October 28, 2006 11:38 AM by Dean

# re: VS 2005 SP1 Takes a While to Install

Heath,

What Jesper is saying is: then don't use Windows Installer...find another method.

Tuesday, October 31, 2006 2:18 AM by Boris

# re: VS 2005 SP1 Takes a While to Install

I'm also confused about why not releasing an updated VS2005 installer containing all those changes from SP1.  Imagine someone wanting to use VS2005 currently:  they'd have to wait an hour to install the original VS2005 and then another couple of hours to install the patch --- there goes their day and brain cells.

Please, just make it easy, not hard...

Tuesday, November 14, 2006 4:22 AM by jacquesvdm

# re: VS 2005 SP1 Takes a While to Install

I saw a suggestion not to attempt on laptop, well I do not have that luxury to decide where it goes. My primary development platform is on a laptop IBM R51, 1.5 GHz with only 512 Meg ram. What can I say, my company is poor.

It took about 30 minutes to finally come up with the message "Preparing to install" and then another 15 minutes to tell me it can’t find the install package. That is now 40 minutes wasted. What I do not understand is that virtually no activity is showing in task manager yet the laptop is useless. Do MS hide the fact that their processes are using all the resources? All I can see is that the patch just consumes all the available memory nothing else.

I am no on my second attempt and this time after 45 minutes the display changes to "Please wait while Windows configures MS VS 2005 team edition for software developers- ENU". Another 15 minutes later and I finally get a question "Do you want to install Yes/No". Maybe after an hour I do not want to install anymore. I suggest you just install, why ask me again. Now for the long wait to actually do the install. At least now I can see the CPU is running at 100%. I am rethinking our strategy to move to VS 2005, I think it is better to just stay with VS 2003. The whole reason for this upgrade is the hope that it will solve the "POOR" VS 2005 IDE performance. I can guarantee anyone that VS 2005 is definitely not a productivity booster. Please prove me wrong.

Sunday, November 19, 2006 3:05 PM by Saivert

# Why the need for VS 2005 at all?

They could just have released .NET Framwork 2.0 and 3.0 addons for VS .NET 2003. It would have worked just the same. But instead they release a total new IDE with less to none new interesting features not possible as addons to VS .NET 2003.

I can understand the need for an upgrade after VS 6.0, but not after .NET 2003.

Saturday, November 25, 2006 6:29 PM by Mystcreater

# Funny question by Saivert

I can say just one word for Saivert that don't know about the utility to update to VS 2005: "Edit and continue". Want anything else???

Tuesday, November 28, 2006 4:34 PM by Heath Stewart's Blog

# Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache

The upcoming Visual Studio 2005 Service Pack 1 can take a while to install and can require a lot of disk

Friday, December 29, 2006 5:23 AM by Heath Stewart's Blog

# The Visual Studio 2005 Service Pack 1 Installation Experience

Visual Studio 2005 Service Pack 1 can take a long time to install and may apply to multiple products

Wednesday, January 03, 2007 11:19 AM by Aaron Stebner's WebLog

# Links to detailed information about Visual Studio 2005 SP1 setup

Heath Stewart has written several very useful blog posts about Visual Studio 2005 SP1 that I wanted to

Friday, January 05, 2007 1:20 PM by JrzyShr Dev Guy

# Visual Studio 2005 Service Pack 1 Available

Go get it here . Hopefully I'm not the first one to point this out to you. But better late than never.

Thursday, January 11, 2007 4:14 PM by Heath Stewart's Blog

# Known Issues with Visual Studio 2005 Service Pack 1

There are several known issues when installing Visual Studio 2005 Service Pack 1 . I've documented these

Thursday, January 11, 2007 4:20 PM by Heath Stewart's Blog

# Known Issues with Visual Studio 2005 Service Pack 1

There are several known issues when installing Visual Studio 2005 Service Pack 1 . I've documented these

Monday, January 15, 2007 5:12 AM by CodeClimber

# Two SP1 in two days

Two SP1 in two days

Wednesday, March 07, 2007 8:09 AM by Heath Stewart's Blog

# Visual Studio 2005 Service Pack 1 Update for Windows Vista Available

As Aaron notes , the Visual Studio 2005 Service Pack 1 Update for Windows Vista is available on the download

Tuesday, April 08, 2008 6:28 AM by .NET Developer Notes

# Installing Visual Studio 2005 Service Pack 1 - Performance Notes

Installing Visual Studio 2005 Service Pack 1 - Performance Notes

Monday, May 12, 2008 1:53 PM by Heath Stewart's Blog

# Changes for Microsoft Visual Studio 2008 Service Pack 1

Microsoft Visual Studio 2008 Service Pack 1 (Beta) has been released to web , along with Microsoft .NET

Monday, August 11, 2008 12:23 PM by Grant Holliday's blog

# TFS 2008 and Visual Studio 2008 SP1 are RTM

Following the release of SQL Server 2008 last week comes the final SP1 release of the following products

New Comments to this post are disabled
 
Page view tracker