firefox performance problems?

| 14 Comments

In the last few weeks, I'm seeing more people complaining about dramatic performance problems. I'm not talking about excess memory usage or a small slowdown in launch time or page loading time, but a serious degradation in performance. One report I just read was a user complaining that it took Firefox 2 almost 30 seconds to launch on his machine while Firefox 1.5 used to start in just a couple of seconds. Another report was of a machine hanging any time the user tried to open more than a few tabs at once.

I've experienced some pretty dramatic problems with Firefox 2 and 3 builds hanging really bad when I tried to open a group of tabs with more than about 6 tabs. Just recently I discovered that Firebug causing some of my problems. Apparently I'd set Firebug to be active on every page and so as I moved around the web, Firefox+Firebug was doing a lot of extra work. Disabling Firebug for everything except my blog where I use it cured me of my major performance issues.

This is the third or forth time that an extension has been the root of my Firefox woes and I suspect I'm not alone.

So, I'd like to do an experiment here. If you want to participate, here are the instructions:

1. List all of your installed extensions.
2. List out your hardware, OS version, and Firefox version.
3. Post your cold start-up time for Firefox - this means after a reboot, when the system is fully loaded and no other applications are running start Firefox and measure the number of seconds it takes to start loading the first webpage.
4. Post your warm start-up time. This means the time it takes to start Firefox after it's been shut down at least once.
5. Post the time it takes to load this set of pages in tabs (just load them as a tab group a few times and come up with an average time it takes to see the last tab's spinner stop: www.yahoo.com, www.cnn.com, gizmodo.com, www.myspace.com, and www.msn.com) or come up with your own set of tabs to measure.
6. Repeat steps 3, 4 and 5 running with all of your extensions disabled and post the results.

Of course, as with all clock on the wall tests, it's not critical that your measurements be exact. The goal here is to see if there are any dramatic performance issues running with and without your extensions.

Here are my results with all of my extensions fully enabled:

1. I have the latest versions of CoComment, Full Page Zoom, Nightly Tester Tools, and DOM Inspector.
2. I'm running a first generation MacBook Pro, 2Ghz Core Duo, 2GB RAM, with OSX 10.4.10. I'm yesterday's Firefox 3 nightly build.
3. Cold start averages about 8 seconds.
4. Warm start is between 1 and 2 seconds.
5. Tab group load takes an average of 8 seconds.
6. With my extensions disabled, my cold start is 6 seconds, my warm start feels a tiny bit faster, around 1 second and the tab group loads in about the same 8 seconds.

So, for me, the extensions seem to have a small impact on startup time but no impact on page loading time for this group of pages.

What's your experience? And if you can do more thorough tests, please do. I just provided these as guidance to try to learn something about extension impact on performance.

Photo by Flickr user pandiyan and used under a Creative Commons license.

14 Comments

http://kb.mozillazine.org/Problematic_extensions

"Disable Firebug when not using it"

There is nothing new about this. People have been reporting performance problems forever and claiming it is a new problem.

Actually, extensions are the root of a lot of problems, and even minor Firefox updates often break something. Unless extensions can be guaranteed to work with other extensions and with future versions of Firefox (they cannot, of course), there should be a prominent disclaimer. As it is, users often associate extension problems with the quality of the browser. You can give the disclaimer a positive spin, but you'd better make it. Do you really want the quality of the browser to be determined by the worst third-party add-on?

All variants and versions of Adblock significantly affect cold and warm starts, and possibly tab opening times. The effects can be worse depending on hardware. Disabling Adblock yields an immediate and noticeable performance improvement, even on my top-end 3.2ghz dual core box.

Installed extensions: grApple theme for Firefox.

Macbook CoreDuo 2,0 GHz, 2GB RAM, OSX 10.4.10.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a7pre) Gecko/2007080104 Minefield/3.0a7pre

Warm startup: 7.07 seconds

Yahoo, CNN, Gizmodo, MySpace, MSN [average over 2 trials, from cache]: 25 seconds

Cold startup, i tried this twice because I couldn't believe it. From a fresh boot Firefox takes up to 2.5 minutes and easily took more than 70% CPU time on both cores, with no other programs running.

When I tried a clean profile (simply erasing the old one) it took more than 4(!)minutes. A warm boot with a clean profile does not make a significant difference from the one with the theme.

Firefox 1.5 does this almost instantly. I checked my services and nothing unusual is running in the background.

I am, indeed, quite shocked about this tremendous performance decrease.
Sites like digg and deviantart have been tedious to use with Minefield because scrolling is so impossibly slow, but I've been assured the new Cairo version should fix that.

Firefox hanging for several seconds when opening tabs could be related to this very old and well analyzed, yet unfixed bug: https://bugzilla.mozilla.org/show_bug.cgi?id=235853

Basically if you use a proxyscript (e.g. common in many companies), firefox resolves dns on the main UI thread instead of asynchronously. This can block the UI for several seconds. Very annoying and highly visible. It basically causes a lot of people to switch to prefer IE over here.

I know this bug is the cause of my performance issues because the suggested fix of hardwiring the proxy settings actually works for me. The difference is very dramatic. Of course from IT management perspective this is a totally unacceptable solution.

The ironic thing is that, probably like most people, I installed Ad Block Plus in order to speed my browsing up.

Well, considering I have over 20 extensions (many of which make contributions to the UI and some of which parse the page content) and that I have usually about 50 tabs open in multiple windows, startup performance isn't that bad (and I have the integrates session restore turned on, so those 50 tabs have to load each time I start/restart the browser).

What IS bothering me is the time it takes for an external link to open in firefox (eg. from Outlook or an external feedreader), during which both FF and the originating application freeze (this takes a few seconds). I think this could have something to do with the recent fixes in protocol handling - especially since 2.0.0.6 this is very noticeable.

You might want to measure FF startup time when it is opened as a result of clicking a link from an external application in the "default browser".

1. 17 Extensions: Adblock Plus (Cedric's List), All-In-One Gestures, ConQuery, Console2, DOM Inspector, Enhanced Histroy Manager, FAYT, Hide Menubar, keyconfig, OpenBook, Secure Login, SmoothWheel, SuperScroll, Tab Mix Plus, Translate, Unified Back-/Forward Button, View Cookies.
2. Athlon XP 2100+, 1GB RAM, 320GB HD, Windows 2000 (a 4 year old system, with exception of the HD, which is a lightning fast 1 year old SATA disk). Firefox 2.0.0.6 with 5MB of history and 1MB of bookmarks.
3. Cold start: ~ 8 seconds.
4. Warm start: ~ 2 seconds.
5. Tab group, cache empty: ~ 11 seconds. From cache: ~ 8 seconds.
6. With extensions disabled: Cold start: ~ 6 seconds, warm start: ~ 2 seconds, Tab Group: ~ 17 seconds uncached, 12 seconds cached (with MSN being the only page that took significantly longer than in step 5.)

This means that under the aspects tested here, Firefox performance of my well-maintained 4 year old W2K box is roughly the same as that of a rather current MacBook Pro with top-notch components. Interesting.

Lionel, in my experience AdBlock Plus does indeed speed up browsing on most pages. There's one execption: if the page is composed of a large number of separate files that all have to be checked by AdBlock, and all end up not being blocked, then AdBlock makes loading the page slower. Those pages, however, aren't all that common.

Furthermore, from what I've seen, AdBlock performance (startup as well as page load) heavily depends on the filter set that is used.

Laszlo, no point in comparing against my setup. I use nightly and sometimes debug builds from the trunk and those just don't yet compare with the Firefox 2 performance numbers.

- A

Athlon XP 2700 (2.16 GHz), 1.5 GB RAM, Windows XP Pro SP2, Firefox 2.0.0.6
Extensions:
Adblock Plus
Adblock Plus Filterset.G Updater
Forecastfox Enhanced
Fullerscreen
Talkback
Cold Start: 6s
Warm Start: 1s
Tab group: 8s

Extensions disabled:
Cold Start: 6s
Warm Start: 1s
Tab Group: 6s

Decided to do a little playing and comparison... and thought you needed some windows numbers.

1. Extensions: Adblock Plus (EasyList USA), BugMeNot, Firebug (FX2 only, disabled on menu), DOM Inspector (FX3 only), Full Page Zoom (FX3 only), Winestripe (FX2 only)
2. System: 2.4GHz P4, 1GB RAM, PATA UDMA133 HDD, Windows XP SP2. Network is 10Mb at best.

FX2: Firefox 2.0.0.5
FX3: Minefield 3.0a7pre
O9: Opera 9.22

3. Cold Startup: FX2: 8s, FX2ne: 6s, FX3: 12s, FX3ne: 11s, IE7: 1s, S: 6s, O9: 3s.
4. Warm Startup: FX2: 2-3s, FX2ne: 1-2s, FX3: 2-3s, FX3ne: 1-2s, IE7: 1s, S: 1s, O9: 1s.
5a. Tab Load (clean cache): F2: 15s, FX2ne: 35s, FX3: 32s, FX3ne: 35s, IE7: 14s, S: 29s, O9: 18s.
5b. Tab Load (warm cache): F2: 9s, FX2ne: 17-22s, FX3: 7-8s, FX3ne: 11s, IE7: 14s, S: 14s, O9: 11s.

So, some conclusions:
1. Extensions slow you down on startup. This is known.
2. Adblock saves lots of page load time. This is known.
3. Firefox is getting slower, and is slightly slower than others... This is known.
4. Your MBP is faster than my desktop... ;-)

Some of the jumping in page load time is due to changes in content. The tests were just done, while three of the sites were doing major stories on this tragedy in Minneapolis, and Gizmodo posted a bunch of new content somewhere in the middle. Possibly also some of the ads were flash, while others were not.

Regards,
-Jeremy

> Laszlo, no point in comparing against my setup. I use nightly and
> sometimes debug builds from the trunk and those just don't yet
> compare with the Firefox 2 performance numbers.

Not to mention the fact that direct cross-platform comparisons are of questionable validity anyway.

Time format: real time (cpu time) - both in seconds

Cold start:
- With all extensions: 167 (82)
- With all extensions except Autocomplete Manager: 101 (40)
- With all extensions disabled: 34 (3)

Warm start:
- With all extensions: 100 (81)
- With all extensions except Autocomplete Manager: 45 (38)
- With all extensions disabled: 6 (2)

Page loading:
- With all extensions: 62
- With all extensions except Autocomplete Manager: 53
- With all extensions disabled: 26

Notice: It seems as multiple restarts after disabling an extension increases performance, I don't know why. Furthermore, the autocomplete function for page titles is in included in Firefox 3, so this will improve performance.

Machine: 1,6 MHz Pentium Mobile, low speed (600 Mhz), 1024 MB RAM

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7pre) Gecko/20070826 BonEcho/2.0.0.7pre

*** Extensions (enabled: 125, disabled: 11; total: 136)
abcTajpu 1.5 [disabled]
Active Stop Button 1.2
Adblock Plus 0.7.5.1
Adblock Plus: Element Hiding Helper 1.0.1
Add Bookmark Here [de] 0.5.8
Add N Edit Cookies 0.2.1.2
Add to Search Bar 1.5.1
All-in-One Sidebar 0.7.1
Autocomplete Manager 2.0
AutoPager 0.1.5.6.4
BatchDownload 1.1.5
Bookmark All [de] 1.2.3
Bookmark quick folder 0.2.20061217
Boox 1.0.3.0
Brief 0.7
British English Dictionary 1.19
Cache View 1.61
CheckFox 0.4
Clippings 2.6
Compact Library Extension Organizer (CLEO) 3.0 [disabled]
Console� 0.3.8
Controle de Scripts 0.5.0.1
CookieSafe 2.0.6
CookieSwap 0.5.0
Copy All Urls 0.7.1
Copy Links 0.1.4
Copy Plain Text [de] 0.3.3.1
CountdownClock 1.4.2
CSSViewer 1.0.2
Daily Dilbert 1.4
Delete Bookmark Icons 0.2.1
Deutsches W�rterbuch 1.0.1
Diccionario de Espa�ol/Espa�a 1.1
Dictionary Switcher 0.8
Dictionnaire MySpell en Fran�ais (r�forme 1990) 1.0.1
Document Map 0.6.1
DOM Inspector 1.8.1.7pre
Download Statusbar 0.9.5.1
DownThemAll! 0.9.9.10
dragdropupload 1.5.23
Enhanced History Manager 0.5.8.05.1
ErrorZilla Mod 0.2
Exif Viewer 1.27
Extended Link Properties [de] 1.2.3
Extension Developer 0.3.0.20060726
Extension Manager Extended 2.6.1
External Application Buttons [de] 0.7.4
FAYT 1.0.0.1
FEBE 5.0 [disabled]
File Title [de] 1.2
Firebug 1.05
FireFTP [de] 0.97.1
Fit Bookmark Icon 0.7
Flashblock 1.5.4.1
FlashGot 0.6.1
Flat Bookmark Editing 0.8.1
FoxyProxy 2.5.3
Fullerscreen 2.02
Graphing Calculator Toolbar 1.4
Greasemonkey 0.7.20070607.0
IDN Info 0.6.6
IE Tab 1.3.3.20070528
Image Zoom 0.3
ImgLikeOpera 0.6.15
InfoLister 0.9f
keyconfig 20050313.1
Layerblock 2.0.7
Leak Monitor 0.3.6 [disabled]
LinkChecker 0.6.1
LinkVisitor 2.0
Live HTTP Headers 0.13.1
Locale Switcher 2.1
Locate in Bookmark Folders [de] 0.2.5
Locationbar� 0.9.1
Lola 0.1
MeasureIt 0.3.6
Menu Editor 1.2.3.3
Microsummary Buddy 0.1.2
Microsummary Generator Builder 0.9.6
Microsummary Manager 0.5 [disabled]
mid 0.7.02
Modify Headers 0.6.0
MR Tech Local Install 5.3.2.5
Multiple Tab Handler 0.1.2007061801 [disabled]
MultiSidebar 0.2.1 [disabled]
My Image Here 1.1.1
Nightly Tester Tools 1.3b3
NoScript 1.1.6.16
OpenBook 1.3.4.1
OpenDownload 1.0.0
Operator 0.8
OperaView [de] 0.6.0.1
OPML Support 1.3
Organize Status Bar 0.5.2
PageShortcuts 0.5.7.3 [disabled]
Platypus 0.66 [disabled]
Pterodactl [de] 0.4.2
RefControl 0.8.9
Remove It Permanently 1.0.6.3 [disabled]
Resizeable Form Fields 0.2.1
Save As Image 1.044
ScrapBook 1.2.0.8
Scroll Search Engines 0.5
Searchbar Autosizer 1.3.7
SearchLoad Options 0.4.1
SearchWords 0.3
Session Fix 0.3.1
SiteDelta 0.9
SmartSearch 3.6
SpiderZilla [de] 1.6.0
Statusable 0.9
Stop Autoplay 0.6.2
Stylish 0.5.2
SubmitToTab 0.3.5
Tab Mix Plus 0.3.6
TableTools 0.20
Tabs Menu 1.4.5
Talkback 2.0.0.7pre
TargetKiller 0.4 [disabled]
Text Link 1.3.2006100702
United States English Dictionary 2.0.0.6
Update Notifier 0.1.5.3
Update Scanner 2.0.13
Uppity 1.4.14
URL Flipper 2.0.1
UrlParams 2.01.02
Verifica��o ortogr�fica pt-BR 1.0.0.1
VideoDownloader 1.1.1
View Cookies CS 1.0.7
View Dependencies 0.3.2.2
View Source Chart 2.5.03
Web Developer 1.1.4
wfx_Versions 0.14
XPath Checker 0.4.1
XPather 1.3
Zotero 1.0.0rc3

*** Themes (1)
Firefox (default) [selected]

*** Plugins
Cult3D Player v5.3.0.154
Adobe Acrobat
Cortona VRML Client
DivX� Web Player
IE Tab Plug-in
Java(TM) Platform SE 6 U2
Microsoft� DRM
Mozilla Default Plug-in
QuickTime Plug-in 7.1.5
RealPlayer Version Plugin
RealPlayer(tm) G2 LiveConnect-Enabled Plug-In (32-bit)
Shockwave Flash
Shockwave for Director
Windows Media Player Plug-in Dynamic Link Library

I want to open 300 tabs and use no more memory than any 10 to 20 tabs would normally use. There is a good reason for this.

I am a tab abuser renewable energy researcher. I quite often find my self with a 100 or more tabs open after a couple hours of heavy search engine use. This brings my machine to it's knees and causes the browser to take up 600MB or more of ram. I am deep into research and I actually do unwind these windows but it may take several day to work through all Very Happy the open tabs.

Once I open this many windows it can take 45 seconds just to switch windows and 20 seconds or more at which time I have no choice but to create a bunch of bookmarks which never have good labels and close the browser. In addition there is inevitably some sort of Javascript, Acrobat or flash bug which causes the browser to use 100% of the available CPU.

My main job is as a enterprise distributed systems architect so here is what I think the answer should be. I have used a similar tactic in a mobile data collection system which runs on CE and it gives the user near instance access across a GUI system that would exceed the device capability by many times.

It works by modifying the tab treatment. In the current implementation HTML parse tree and GUI widgets are all loaded for all tabs. It is actually the parse tree and the associated GUI widgets that take up a majority of the memory. But it doesn't have to be this way.

A better option is to treat tabs as a cached resource so that other than the last 10 or so I accessed the only thing Tab Mix needs to maintain in memory is the URL and title for the tab which could be stored on disk. The Tabbed page is automatically cached on disk so if I visit a tab that is not currently loaded it simply needs to reparse the cached page and redisplay which on my machine happens within 2 seconds most of the time under 1 second when rendering from cache.

The only GUI resource that needs to be used is to display the tab at the top of the page. The rest of the page can remain unallocated until that tab is selected by the user. To give the illusion of instant tab switching a LRU algorithm is used to keep the parsed tree and page for the last 10 (User defined) tabs that where accessed. There is a high statistical probability that the user will revisit recent tabs so they see nearly instant switches most of the time but all the other tabs are there and will reload from cache if the user clicks on them. When the tab cache is full and the user opens a new tab or accesses on not in memory the LRU algorithm picks another tab which the user has not used for a while and frees up memory before rendering the new tab.

This may seem counter intuitive but with the modern CPU speeds pages render nearly instantly and the machines only slow down when the windows memory is overloaded. When the machine is forced into virtual memory the machine slows to a crawl because all the time is spent load and unloading memory pages from disk. The key is that as the VM is forced into thrashing due to excess memory usage it can take 20 to 30 seconds to switch tabs anyway. With this strategy it would never take more than 2 seconds to reparse the page because there is not context thrashing due to VM overload.

Yes I know one answer is to buy a machine with more memory but I already have the 1.5 Gig maximum tolerated by my laptop and since I already have 3 batteries, 3 docking stations and several chargers I am loath to change to a new model of laptop.


One of the advantages is that out of any 10 to 20 tabs there is a relatively low possibility of the page which is causing the bug that causes firefox to consume 100% of the CPU will be loaded whereas out of 100 tabs it is almost guaranteed that one or more of the tabs will contain a problematic script. The LRU algorithm will naturally end up killing the problem page rather than having me laboriously work backwards through the tabs until I find the culprit.

I think this is actually an implementation issue for Firefox but am not quite sure how to get the concept the visibility it needs.

Joseph Ellsworth: There's a bit more to it than just storing the URL and title of the page. The browser also needs to store the URLs of any frames, the contents of any form fields, and Javascript state including any modifications to the DOM that have been made. It's that last item that's the killer. Tracking changes made to the DOM would incur a significant performance overhead. You could save the entire DOM state to disk, but can you do that more efficiently than the OS's own paging algorithms?

What could be done safely is dropping any image bitmaps. In most cases stopping plugins would be acceptable, but for people using rich flash applications it would be a show-stopper. So you'd need a new optional API for plugins to freeze and unfreeze themselves.

Note, however, that people with 2GB of RAM don't want to pay a performance penalty for tab switching just to keep people with 256MB of RAM happy. So the algorithm would need to be adaptive.

Also note that the UI for dealing with 300 open tabs isn't really there yet (yes, there are extensions that try to help, but they don't really help help).

What I'm getting around to saying is that that this feature is unlikely to be worth the development effort. Installing NoScript and using it to disable plugins by default is gonna make your life much easier for much less outlay. Also, there's an option somewhere in Acrobat to make it open PDF files in a separate window instead of using the plugin. If you can find it, you should definitely use it.

Monthly Archives