IEInternals

A look at Internet Explorer from the inside out. @EricLaw left Microsoft in 2012, but was named an IE MVP in '13 & an IE userAgent (http://useragents.ie) in '14

Unshackling IE8 Performance

Unshackling IE8 Performance

Rate This
  • Comments 37

In general, IE8 is a significantly faster browser than prior versions. We made a number of major investments throughout the browser’s code to help ensure that IE users will have a great real-world experience on the web.

However, it is definitely the case that some users are experiencing abnormal and suboptimal performance when browsing. This post aims to demystify some of the problems we’ve seen that lead to poor performance, and help you resolve those problems. If your browser is lagging, please read on.

Note: This post primarily covers IE8, although some of the advice will work for IE7 as well. I strongly encourage all users to upgrade to IE8, and install all patches from WindowsUpdate.

Performance Measurement

First, let’s have a look at how to get more insight into where the time goes when IE is performing common operations like starting up or opening a new tab. For comparison’s sake, each of these operations takes well under 1 second on each of my computers.

A lightweight way to get more insight into your browser’s performance is to use the Process Monitor tool. Process Monitor allows you to view all registry, filesystem, and process activity on your computer, and includes a powerful set of filtering features to enable you to narrow down your view to just one process.

One caveat: It’s important to understand that Process Monitor is not the most in-depth profiling tool available, and understanding its results requires some skill-- I’m far from an expert myself. Christian’s blog post explains some of the perils of trying to perform accurate performance comparisons. However, with patience, even regular users can use Process Monitor to catch some performance bottlenecks.

When monitoring Internet Explorer, I take the following steps:

  1. Close all IE windows.
  2. Check Task Manager to be sure all iexplore.exe instances have shutdown.
  3. Start Process Monitor.
  4. Inside Process Monitor, click the menu item Filter > Filter… and add a rule ProcessName is iexplore.exe then Include to filter out events from other processes.
  5. Start IE.

At this point, you will see new events in the Process Monitor log. You can clear the list at any time (say, to begin tracking a new scenario) by hitting CTRL+X. You can save the filtered events list to a log file using the File > Save menu.

With Process Monitor at the ready, let’s dig in.

Common Problems> Software Interactions

Internet Explorer exposes a powerful extensibility model and respects Windows’ system settings. While this power can be very useful, it also unfortunately means that other misbehaving software can greatly impact your browsing performance when using IE. In this section, I’ll cover some common performance issues caused by other software.

Common Problems> Software Interactions> Browser Add-ons

Browser add-ons are a top cause of slowness when IE starts, when new tabs open, and as you surf the web. They’re also a top source of crashes and security vulnerabilities. Unfortunately, many users have unwanted and unneeded add-ons installed and don’t even realize it. You can see the list of installed and enabled browser add-ons using the Tools > Manage Add-ons menu item inside IE. You can individually enable and disable add-ons; changes will take effect when the browser is restarted.

I strongly recommend that users who are experiencing performance problems try disabling browser add-ons: if performance significantly improves, then the bottleneck is likely one or more add-ons. For troubleshooting purposes, you can easily start IE without add-ons using the Internet Explorer (No Add-ons) item in the Start Menu, or use the command line iexplore.exe -extoff.

Now, it’s important to understand that not all browser extensions have the same impact on performance.

  • Toolbars and Browser Helper Objects (BHOs) load every time you start IE, and on every new tab you create. These are the most important add-ons from a performance perspective.
  • ActiveX controls run only when requested by the current website. Popular ActiveX controls used on many sites can cause performance problems.
  • Explorer Bars only run when they are made visible using the View > Explorer Bars menu.

Pluggable Transfer Protocols can have a major impact on performance and reliability, but unfortunately they are not listed inside Manage Addons. Transfer Protocol wrappers are often installed by download managers or offline frameworks like Google Gears.

The following types of extensions only run when you actively use them, so they usually have little impact on performance:

On the far-right side of the Manage Add-ons list, you’ll see a “Load Time” column. This column shows how long the toolbar or BHO add-on took to load. You can disable slow-to-load add-ons if you aren’t willing to make the performance tradeoff for whatever functionality they provide. For any add-ons you decide to keep, you should periodically check the add-on provider’s website for any updated versions.

Note: If the extension indicates that it's "Disabled" and you didn't disable it during this browsing session, then it's not actually loaded. The text "Currently loaded" in the dropdown is a bad choice of words, but "Add-ons that are or would be currently loaded *if* they were not previously disabled" isn't a great piece of UI text either.  In the same list, "Run without permission" is another bad choice of words-- "Addons for which permission has been perpetually granted" is more accurate but wouldn't neatly fit.

By disabling unwanted add-ons, you can help ensure that IE is only spending time loading content and add-ons you care about.

Common Problems> Software Interactions> Security Software

Over the years, we’ve made huge investments in browser security and we’ve worked hard to make sure all of these new features have a minimal impact on browser performance. Unfortunately, the same cannot be said of all 3rd-party security software, some of which has a severe impact on IE Performance. Problematic characteristics of such software include:

  • Hooks – Some security software attempts to scan content as it flows through IE using either undocumented interfaces, or the Pluggable Transfer Protocols mechanism mentioned earlier. Unfortunately, this type of hooking incurs a significant performance cost, and often results in reliability problems as well. Sometimes, such hooks are implemented by modifying Internet Explorer’s private registry keys, leading to myriad, hard-to-diagnose problems.
  • Compression Stripping – As documented in Steve Souders' new book Even Faster Web Sites, some security products will strip off the Accept-Encoding request header that is used to signal to servers that they should send back compressed HTTP content if possible. By stripping the header, such products prevent servers from sending your browser compressed content, meaning that page downloads might take up to 500% longer. You can check if your browser is sending an Accept-Encoding header by looking in the Headers section here.
  • Security Zones Spamming – Some security products place a huge number of sites in the Restricted Sites zone. This can be useful because it prevents such sites from delivering file downloads or executing script, but the Zones system was not designed to accommodate thousands of manually specified sites and performance will suffer when Zones are configured in this way. From a security point-of-view, static blocklists like this aren’t a very good security mechanism, as they’re too easy to circumvent.

I recently took a deeper look at the “Security Zones Spamming” problem using a registry file provided by a user of one of the security products. The feature in question was named “Inoculate” or “Immunize” or similar, and it resulted in the addition of 40,000 registry entries within IE’s Zones keys. The customer sent me a registry export script (.reg) to analyze on my machine.

My machine is a pretty fast one: a Lenovo X200 with an Intel Core 2 Duo P8600 @ 2.4ghz, Intel X25-M SSD, 3gb of system memory, running 32bit Win7.  Before I imported the 11MB (!!!) registry script, I took the following measurements using the the Tools > Registry Summary menu in Process Monitor:

  • Registry time on IE boot to about:blank took 0.1426863 seconds, with 12,387 total events.
  • Registry time on IE new tab to about:tabs took 0.0872716 seconds, with 7586 total events.

After I was done importing the scripts, I closed IE, cleared the Process Monitor log, and retook the measurements:  

  • Registry time on IE boot to about:blank increased to 1.305558 seconds (915%), with 222,481 total events.
  • Registry time on IE new tab to about:tabs increased to 0.6903690 seconds (791%), with 112,602 total events.

The registry time captured by Process Monitor does not include any time spent on the IE side setting up the data structures into which the data is read and organized, so the registry time alone does not account for the full impact of having the Zones-Spamming feature enabled. Note: The CPU time was much greater before the June IE Cumulative Update, due to a bug in the algorithm used to populate the Zones in-memory cache.

Unfortunately, some security software will make these types of system changes without fully explaining their impact to the user, and troubleshooting such problems often requires careful examination with tools like Process Monitor. Users should be on the lookout for performance degradations after security software is installed.

Common Problems> Proxy Detection

Internet Explorer supports a mechanism called Automatic Proxy Detection which implements the WPAD algorithm. This allows the browser to find a proxy server on the local network without any fixed configuration information on the client. Unfortunately, WPAD can be a very slow process, because it involves multiple network lookups, which may take a long time depending on the network configuration.

You can see whether or not Internet Explorer is configured to Automatically Detect Settings by clicking Tools > Internet Options > Connections > LAN Settings. If you uncheck the checkbox, the WPAD feature is disabled. Internet Explorer includes an optimization such that, if the very first time WPAD runs, a proxy isn’t found, WPAD is auto-disabled, but this is mostly only useful for machines that are only used at home. If you move your computer between networks (e.g. a laptop) you may have WPAD enabled.

Corporate users should keep in mind that disabling WPAD can have some surprising side-effects, so it may be useful to quickly enable or disable the Automatically Detect feature. The IE Proxy Pick add-on (a command-bar button, so it doesn’t hurt performance :-) allows you to quickly switch between proxies. Command line junkies may prefer the command-line version.

Also, keep in mind that some corporate proxies will be configured with security software that performs compression stripping.

Conclusion

The IE team remains hard at work tracking down performance bottlenecks and working with 3rd parties to help reduce the performance impact of other software on your browsing experience. If you’re experiencing any IE8 performance problems, hopefully the tips above will help you isolate them.

If you have a performance tip (or find an add-on or product that hurts performance) please leave a comment below.

Thanks!

-Eric

  • I think it would be good for Microsoft to produce more information on specific security software versions and/or features that causes significant performance issues when using IE8.

    Else provide users with some easier and better means to detect such causes for the slow performance.

    Looking around on many sites, performance is one of the often mentioned issues of IE8 even though its speed increase compared to IE7 is very significant.

    The detection of many 'new' performance issues in new tab creating seem related to the tab isolation feature. A great feature but it seems to highlight the poor performance in IE new process starts caused by solutions provided by addon and security software builders which before were only visible at slower IE startup. The article example of putting in 40,000 registry entries to scan trough at a new process startup hightlight this problem.

  • Yes, the LCIE architecture certainly does bring increased attention to process startup time, and the impact that add-ons or unusual configurations (e.g. Zones-spamming) has on that time.

  • Part of the issue with performance is the "visual" perception.  In addition to fixing the above mentioned items I feel that the "Connecting..." string in and of itself causes user frustration.  When opening a new tab there is nothing to even connect to! thus users already get a sense that things are taking longer than needed.  "Loading..." is a much, much more appropriate message.

    As for the removal of the spammed sites into the registry... I'm not sure how to explain this but it seems like they are cached for a while.  I removed all that were in my list but I didn't see any improvement until days later.  I'm using a laptop so I'm wondering if it wasn't until after a good reboot that they took effect? vs. hybernating?

    thanks for the info!

  • @marshal: The point on the misleading string is certainly valid.

    Registry updates will be effective as soon as all IE instances are closed and restarted. You need to make sure to remove both the HKCU *and* HKLM domains.

  • I find that most of my slow downs are with pages that use flash.  In fact, on Facebook - Mafia Wars at times will eat up about 500mb in the iexplorer process.  anyone else hear of these problems with flash and the new ie8?

  • A small question : Would it be possible for IE9 to show a message when new AddOns are installed in Internet Explorer ?

    When Internet Explorer is launched, it look at the list of installed add-ons. If there's a change, IE then show the the user a list of new add-ons, the manufacturer, and BTW their load time. The user can then decide if he want to continue to work with these add-ons enabled, or if he prefer to disable these.

    Beside the performance issue that an addon can cause, it's also a security issue. If an add-on has been installed in IE, the user should know it right after the next run of IE, as this may be a virus or at least a malware.

    Maybe you also can check for abnormal IE's slowdown, and propose to submit an (automatic) rapport to Microsoft. Thanks to the informations, you then could say if Microsoft has a solution to the problem (if the rapport shows that the registry is abnormally used, then you could ask if Spybot Search & Destroy is installed).

    It would help non-developer user that wonders why their IE is so slow, and that finally use another browser because they think that IE is faulty.

  • The Skype team reports that they've released an updated plugin with a lower performance impact. http://www.skype.com/go/download

    @FremyCompany: Great suggestions, thanks. :-)

  • My IE8 was extremely slow since a couple of weeks, sometimes just hanging. It was extremely fast when I started it without the add ons. After disabling the Skype add on it is back to its normal self. Thanks man, this helped!

  • Here is my reccomended IE8 config:

    Enable InPrivate filtering by default as follows:

    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Safety\PrivacIE]

    "StartMode"=dword:00000001

    Internet Explorer Zones:

    Internet set to high with protected mode enabled, all sites show as Internet zone unless are Intranet or trusted

    Intranet set to medium-high, protected mode disabled, add sites that won't work on high, ex: *.weather.com

    Trusted set to medium, protected mode disabled, add trusted sites, ex *.google.com

    Restriced, no changes (pretty useless when Internet zone is set to High), if you find a malicious site

    Note wildcard *.site.com so do not need to add http, https, ftp, etc. when building site list on zone.

    I wish I new of a way to export and import this, so not to have to manually configure the zounes.

  • @jj-- That's a fine configuration, although putting sites into the Intranet zone has some minor side-effects that aren't shown in the UI; generally, I'd recommend not using the Intranet zone in this way and simply use the Internet, Trusted, and restricted zones.

    In terms of import/export, while it's technically unsupported to do so, all of these settings are maintained in the registry, so you could copy them from machine to machine in a .REG script.

  • Good feedback on the zones, thanks! Perhaps I should set Intranet medium, Trusted to medium-high and flip-flop my definitions.  The objective here is to default all sites high (similar to restricted) and maintain some granularity after that.  It's a shame that we can't configure IE8 to default all sites to Restricted.  If the Intranet zone is used for non-Intranet sites then at a minimum, the setting at the very end of the list for User Authentication shoul be changed to prompt for user name and password, otherwise your local credentials can be sent outside your local network.  Any suggesteions on how to improve/optimize this config would be welcome.

  • I noticed that sometimes I seem unable to get connection to a site with a new tab whilst an older tab produced the site in a second or two. The new tab has already appeared and then I paste in the url and it hangs stating connecting. Pasting it in an existing tab in the same browser windwos makes it show in a one or two seconds

    What could cause this ?

    Also I checked the proces monitor on this issue but it does not show any significat CPU usage. It does show a lot of failing registry call to the same CSLID {0BE09CC1-42E0-11DD-AE16-0800200C9A66} (fails on NAME NOT FOUND) which seems Flash 10 related even though there seems no flash component or anything else downloaded yet however that does not seem related to the hanging of the tab. It looks something connection related but it is unclear why older tabs are not troubled by it.

  • @hAl: When you say it "hangs"-- is that to say that it just spins, making no progress, but doesn't actually hang (forcing you to kill the process)?

    Typical culprits here are exhaustion of the connection pool (e.g. no available connections) or proxy problems. You might try navigating that tab to a different host and/or turning on Fiddler to see if the request even hits the wire.

  • It is not making progress.

    I can still stop the page load and kill the tab.

    Reopening a new tab on the same windows or even a new IE window and pasting the link again gives the same result.

    Just Connecting... but nothing happens.

    Switching to an old open tab and pasting the same link and it opens fairly quickly.

  • Btw, no Proxies, AVG free anti virus in use.

    How can I check the exhaustion of the connection pool ?

Page 1 of 3 (37 items) 123
Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post