Why is Firefox 3.0 slower than 2.0.0.X on Linux?

Discussion about official Mozilla Firefox builds
User avatar
toods
Posts: 255
Joined: December 22nd, 2004, 9:33 am
Location: Cornwall, UK

Why is Firefox 3.0 slower than 2.0.0.X on Linux?

Post by toods »

I have been making my own optimised Firefox builds since 1.5 for use on my 2 Linux PCs. I have recently started to experiment with Firefox 3.0rc1 builds. I have tried various combinations of compiler flags and '.mozconfig' option combinations, but in all cases 3.0rc1 is less 'responsive than 2.0.0.14 on both my installations.

As an example, if I sequentially load the following 3 sites: www.uk.yahoo.com; www.bbc.co.uk and www.slackware.com then use the 'bfcache' to rapidly change from one site to the next, the rendering is practically instantaneous with Firefox 2.0.0.14, but there is always a significant delay with the Firefox 3.0rc1 builds.

I have read the various postings about issues with 'fsync' and 'urlclassifier2.sqlite' causing issues on Linux, but has anyone else experienced the slowdown that I experience and obviously, any suggestions about the cause or a potential remedy?.

Bill.
Slackware, 12.1
User avatar
asquithea
Posts: 1533
Joined: March 17th, 2003, 2:43 pm
Location: Guildford, UK

Post by asquithea »

Possible causes that come to mind would be an overhauled layout engine (slower), new rendering engine (slower in places), and automatic memory conservation for images (decompression required again after a tab has been idle for only about 15 seconds).

Of course, I'm speculating from Windows, so your experience might be something completely different.
User avatar
Bluefang
Posts: 7857
Joined: August 10th, 2005, 2:55 pm
Location: Vermont
Contact:

Post by Bluefang »

What distro are you using, what's your video driver, and do you have any video acceleration turned on?
There have always been ghosts in the machine... random segments of code that have grouped together to form unexpected protocols. Unanticipated, these free radicals engender questions of free will, creativity, and even the nature of what we might call the soul...
teoli2003
Posts: 5091
Joined: November 10th, 2005, 2:54 am
Contact:

Post by teoli2003 »

Do you compile with PGO?
bielawski
Posts: 252
Joined: November 21st, 2007, 11:27 am

Post by bielawski »

WFM - I see the exact opposite with both official and custom builds.
User avatar
toods
Posts: 255
Joined: December 22nd, 2004, 9:33 am
Location: Cornwall, UK

Post by toods »

Bluefang wrote:What distro are you using, what's your video driver, and do you have any video acceleration turned on?

Distro is Slackware 12.1,
Video card Nvidia Geforce3 Ti200
Driver is Nvidia legacy 96.43.05, so I guess video acceleration is dealt with by the Nvidia driver.
teoli2003 wrote:Do you compile with PGO?

No I don't - would this possibly help?.

Incidentally, switching between 'tabs' is noticeably slower in Firefox 3.0 compared to 2.0.0.14.

Bill.
Slackware, 12.1
bielawski
Posts: 252
Joined: November 21st, 2007, 11:27 am

Post by bielawski »

toods wrote:
teoli2003 wrote:Do you compile with PGO?

No I don't - would this possibly help?.
This might - the official Windows builds use PGO and some users noticed considerable speed improvements when it was introduced. Note that building with PGO will take around 2.5x the time of a normal build.
User avatar
BostonPeng
Posts: 343
Joined: October 31st, 2007, 9:39 am
Location: Malden (Boston), MA
Contact:

Post by BostonPeng »

toods wrote:Do you compile with PGO?

No I don't - would this possibly help?.[/quote]
I'd say definitely. Once they started building with PGO I noticed a definite improvement in speed.
Proud Ubuntu Intrepid/Mac4Lin user, and Firefox 3 has gotten me to using Epiphany as my default browser so I check these forums a lot less often than I used to.
I used to be known as (Old)HardinComp | My Blog
User avatar
Stifu
Posts: 984
Joined: July 13th, 2007, 8:02 am

Post by Stifu »

Still, even before PGO, Firefox 3 was already much faster than Firefox 2, so the problem must be somewhere else.
Besides, HardinComp, your sig says you're a proud Ubuntu user, so you shouldn't be concerned by PGO, since it only concerns Windows by default at the moment... Unless you have another computer with Windows, or something.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

Have you tested the official builds to see if this is limited to your build config? Also, this thread should probably be in third party builds.
User avatar
toods
Posts: 255
Joined: December 22nd, 2004, 9:33 am
Location: Cornwall, UK

Post by toods »

Ted Mielczarek wrote:Have you tested the official builds to see if this is limited to your build config? Also, this thread should probably be in third party builds.


Yes, I have tried the official build and get exactly the same result.

you are probably correct that this thread should be in 'Third Party Builds', but for continuity, I will post my '.mozconfig' for comment:

# Options for client.mk.
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ffobjs
export CFLAGS="-O2 -march=athlon-xp -pipe"

# Options for 'configure' (same as command-line options).
ac_add_options --enable-optimize="-O2 -march=athlon-xp -freorder-blocks -fno-reorder-functions -gstabs+ -msse -mmmx -m3dnow -mfpmath=sse"
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-application=browser
ac_add_options --disable-accessibility
ac_add_options --disable-jsd
ac_add_options --disable-logging
ac_add_options --disable-mathml
# ac_add_options --with-distribution-id=Toods
# ac_add_options --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices
ac_add_options --disable-freetype2
# ac_add_options --enable-xft
ac_add_options --disable-shared
ac_add_options --disable-installer
ac_add_options --disable-debug
ac_add_options --disable-updater
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-tests
# ac_add_options --disable-libxul
# ac_add_options --enable-static
ac_add_options --disable-crashreporter
ac_add_options --disable-reporter
ac_add_options --enable-svg
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
# ac_add_options --with-system-png
# ac_add_options --enable-system-cairo
ac_add_options --disable-pango


I have tried to build with '-enable-glitz' as this is the back-end for Cairo rendering, but the build fails.

Bill.
Slackware, 12.1
rickst29
Posts: 182
Joined: January 22nd, 2003, 10:45 pm

Re: Why is Firefox 3.0 slower than 2.0.0.X on Linux?

Post by rickst29 »

toods wrote:.... if I sequentially load the following 3 sites: www.uk.yahoo.com; www.bbc.co.uk and www.slackware.com then use the 'bfcache' to rapidly change from one site to the next, the rendering is practically instantaneous with Firefox 2.0.0.14, but there is always a significant delay with the Firefox 3.0rc1 builds.
I have read the various postings about issues with 'fsync' and 'urlclassifier2.sqlite' causing issues on Linux....


Your activity (reloading sites rapidly) DEFINITELY provokes the fysnc-on-ext3 bug with places.sqlite (bug 421482). BTW I was quite involved in that bug, and ultimately the first non-Mozilla tester. (I'm Linux, with $HOME on an ext3 filesystem. Some pretty big brains have been thinking about that bug, even Andrew Morton dropped in with a few posts.) Please try the following, if you don't want to wait a week or so for "RC-2" to come out:

(1) Get a mozilla-built nightly build or get fresh code for doing your own, because RC1 is way too stale-- it doesn't contain the preference definition yet. Here: http://ftp.mozilla.org/pub/mozilla.org/ ... 86.tar.bz2

(2) bunzip2 and tar -xvf in the usual way, or build/install your own from "fresh" source.

(3) start Firefox, then go into help -> about:? -> about:config

(4) add a new integer-type preference, "toolkit.storage.synchronous", and set the value as 0 (zero). restart Firefox, your problem should be reduced by at least 2/3.

(5) from time to time, be sure to backup your bookmarks to a JSON file -- in case your places.sqlite becomes corrupted, losing all your bookmarks.

(6) Do note that your UA will be "Minefield", not "Firefox". But most UA-testing javascript tests for "mozilla/5.0" rather than "firefox". Use "User Agent Switcher" if you need to.
- - - - - - -

Although they label the bug as "fixed", IMO it's more of a mere "workaround". The RIGHT solution of caching your "history" updates in memory for quite a long time, saving them to write into the places.sqlite file in one big batch, is a Firefox 3.1 item. Too big a change to do this late in the game.
- - - - - - -

Slightly OT: urlclassifier2.sqlite as an old file, you can delete it when/if you move permanently to FF3. The current malware/phishing database is "urlclassifer3.sqlite", and I have a suggestion: Those people who have been running FF3 for more than a week, and who have lots of bandwidth available to start over, should maybe DELETE the file completely and let it be rebuilt-- the Google guys are aware of some redundancies and innefficencies in the DB, but don't know how to detect that your DB is "old version" and contains these problems. If you delete it for them, it will be rebuilt with better contents.
Last edited by rickst29 on May 28th, 2008, 12:53 pm, edited 2 times in total.
Make a fire FOR a man, he'll be warm for the rest of the night. Set a man ON fire, he'll be warm for the rest of his life!
User avatar
toods
Posts: 255
Joined: December 22nd, 2004, 9:33 am
Location: Cornwall, UK

Post by toods »

Many thanks Rick for your reply.

I will try your suggestions and report back in due course.

Bill
Slackware, 12.1
User avatar
BostonPeng
Posts: 343
Joined: October 31st, 2007, 9:39 am
Location: Malden (Boston), MA
Contact:

Post by BostonPeng »

Stifu wrote:Besides, HardinComp, your sig says you're a proud Ubuntu user, so you shouldn't be concerned by PGO, since it only concerns Windows by default at the moment... Unless you have another computer with Windows, or something.
Actually I did see a boot in performance around when PGO got turned on, and I thought for sure I had heard that Linux builds were getting the PGO treatment. Evidently it was just the tweaks in the code that sped things up. Thanks for the clarification.

And for the record, I don't even use Windows in VirtualBox. I have two programs installed under WINE (Dreamweaver and Fireworks) But I haven't had to fired either of them up in a while. :)
Proud Ubuntu Intrepid/Mac4Lin user, and Firefox 3 has gotten me to using Epiphany as my default browser so I check these forums a lot less often than I used to.
I used to be known as (Old)HardinComp | My Blog
adrianm2
Posts: 40
Joined: November 6th, 2002, 6:19 pm

Post by adrianm2 »

toods wrote:
Bluefang wrote:What distro are you using, what's your video driver, and do you have any video acceleration turned on?

Distro is Slackware 12.1,
Video card Nvidia Geforce3 Ti200
Driver is Nvidia legacy 96.43.05, so I guess video acceleration is dealt with by the Nvidia driver.

Incidentally, switching between 'tabs' is noticeably slower in Firefox 3.0 compared to 2.0.0.14.


Sounds like you have your 2D acceleration messed up. Switching tabs will make no writes to the sqllite database, and will load up the X server a lot.

In your /etc/X11/xorg.conf try switching the driver to nouveau and adding Option "AccelMethod" "EXA" to your device config. Then restart X and see if Firefox is faster.

Firefox 3 uses the X server to accelerate lots more things than 2.0x did(cairo,fonts), making it much faster if setup correctly. On the other hand much slower if setup wrong.
Post Reply