Firefox acting slow
Closed, ResolvedPublic

Description

After upgrade from firefox 56.0.1 to 56.0.2 pages loading time went up, making it almost unusable.

Not sure what logs to provide, open to provide as much info as needed to fix the issue.

selfus created this task.Nov 6 2017, 12:29 AM
Justin added a subscriber: Justin.Nov 6 2017, 3:16 AM

Have you disabled all extensions and tried?

Justin edited projects, added Software; removed Lacks Project.Nov 6 2017, 3:17 AM

It seems it may be an issue with a legacy addon, AdBlockPlus

Why are you removing the project? Please don't modify tasks. Can you confirm the speed has improved since disabling the addon?

In T4966#88802, @selfus wrote:

It seems it may be an issue with a legacy addon, AdBlockPlus

FWIW: uBlock Origin is a nice replacement for AdBlockPlus and it's already available as webExtension.

selfus added a comment.Nov 6 2017, 9:33 AM

Sorry @Justin , it did it automatically

@kyrios123 I will try adblock first, but thanks for the suggestion

I also found Firefox loading pages slower. Disabling Tab Groups which was the only Legacy addon I had, I noticed the default content process limit went from 1 to 4 under Performance in settings when you disable "use recommended performance settings".
I think this has something to do with Stylo being enabled by default.

@mate-user I agree with you.

I seen an improvement after disabling legacy addons, but the behavior has now returned and some pages are still loading very slowly, I am looking at you gitlab.

zed added a subscriber: zed.Nov 14 2017, 3:33 PM

I have the same problem of slowing down ; as said mate-user by deactivating servo: firefox has no more worries. under manjaro servo is not active.
"layout.css.servo.enabled to false"

I tried Firefox 57 in a Linux Mint 18.3 beta Mate live USB session and it worked very fast with Stylo/Servo enabled by default.
Hopefully once Firefox 57 is released as a stable update in Solus, this issue will be resolved.

Firefox 57 still seems slow for me on Solus Mate. Setting "layout.css.servo.enabled" to false in about:config seems to load pages faster.

zed added a comment.Nov 19 2017, 9:13 AM

I confirm, without servo firefox 57 goes faster ,with servo some pages do not respond anymore......

For now I've disabled servo and Firefox works much faster. Hopefully Firefox for Solus is updated to disable servo by default.

Jacalz added a subscriber: Jacalz.Nov 19 2017, 12:29 PM

Yeah I had the same issue and disabling servo fixed it 👌

Solus Budgie

Setting "layout.css.servo.enabled" to false in about:config also improved FF 57 speed performance...compared to the default setting of true.

GM

ikey added a subscriber: ikey.Nov 20 2017, 6:58 AM

Trying an optimised build here to see if I can get PGO going. If servo turns out to be the main culprit we'll turn it off.

Hey Boss,

Yeah, that servo change helped quite a bit. What I wouldn't say is Chrome-like performance gains, but then again maybe Quantum isn't suppose to be on par with it with their first release of the new engine.

Maybe I'm full of it too, and it should kick -ass. ;)

Like you, I'm seeing 6194 via Peacekeeper.

Thanks for taking a peek!
GM

Also, that Peacekeeper 6194 result is via an i7 Kaby Lake w/12GB...if it's of any help.

GM

ikey added a comment.Nov 20 2017, 8:59 AM

Copying across my comment from Reddit:

Repo Firefox

PGO Firefox

PGO Firefox w/o Servo

Final review: PGO/Firefox/No-Servo appears to be the winner here all things considered. Notably sites like theregister + reddit load far fast when clicking through the site without servo, and has shown stability issues in another Solus bug report (unresponsive pages).

As such, I'll now push a new Firefox build with Servo turned off, and PGO enabled. For now, Mozilla Telemetry (optional build config) will not be turned on until I learn from Mozilla that I'm OK to do this.

ikey added a comment.Nov 20 2017, 8:59 AM

@GreenMartian would love to see your results after the build goes in if you're up for it :D

Newbie question here:

Isn't Servo supposed to be the "new" stuff introduced for speed improvements in firefox 57?

ikey added a comment.Nov 20 2017, 9:19 AM

@Paradoxeuh yes - but sometimes things might be too new :D We can evaluate it again on the next major version

Will surely do. I'll post those results ASAP after downloading your next build updates.

Thanks!
GM

ikey added a comment.Nov 20 2017, 9:53 AM

Latest build is here if you're not on unstable =)

sudo eopkg it https://packages.solus-project.com/unstable/f/firefox/firefox-57.0-110-1-x86_64.eopkg

Shit that was fast!

Then I'll do it right away for you then. Hold just a minute please...

Peacekeeper results increased to 6680.

GreenMartian added a comment.EditedNov 20 2017, 10:07 AM

Let me know if you'd like a screenshot of that result uploaded.

Scratch that, here it is anyway ;)

Peacekeeper = 6680

Browserbench =73.8

In contrast, here's my results using FF 57 directly from Mozilla's site.

Peacekeeper = 7369

Browserbench = 86.0

ikey added a comment.Nov 20 2017, 10:26 AM

OK so they're still running faster than us. Bugger. Alright I guess it's time to compare about:buildconfig, Cheers :)

My pleasure. Will check in over the next couple days to see if there's a need for any additional build testing...

GM

I wonder if this a linux issue with stylo or if it is the same on windows and mac?

This comment was removed by Jacalz.
ikey added a comment.Nov 20 2017, 10:45 AM

Goddamn thats some diff.

Arithmetic Mean:113 ± 1.3 (1.2%)

ikey added a comment.Nov 20 2017, 10:48 AM

Mozilla Build

GCC:

-Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wformat -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pthread -pipe

G++:

-Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wformat -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -D_GLIBCXX_USE_CXX11_ABI=0 -pipe -g -fprofile-use -fprofile-correction -Wcoverage-mismatch -O3 -fomit-frame-pointer -Werror

Build:

MOZ_AUTOMATION=1 --enable-update-channel=release MOZILLA_OFFICIAL=1 PKG_CONFIG=/builds/worker/workspace/build/src/gtk3/usr/local/bin/pkg-config MOZ_PGO=1 CCACHE=ccache CC=/builds/worker/workspace/build/src/gcc/bin/gcc CXX=/builds/worker/workspace/build/src/gcc/bin/g++ --enable-js-shell RUSTC=/builds/worker/workspace/build/src/rustc/bin/rustc CARGO=/builds/worker/workspace/build/src/rustc/bin/cargo --enable-default-toolkit=cairo-gtk3 --with-mozilla-api-keyfile=/builds/mozilla-desktop-geoloc-api.key --with-google-api-keyfile=/builds/gapi.data LLVM_CONFIG=/builds/worker/workspace/build/src/clang/bin/llvm-config --enable-rust-simd MAKE=/usr/local/bin/gmake --enable-crashreporter --enable-elf-hack --enable-official-branding --enable-stdcxx-compat --enable-verify-mar

Solus Build

GCC:

	-Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -Wformat -Wformat-security -fno-omit-frame-pointer -fexceptions -D_FORTIFY_SOURCE=2 -fstack-protector --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pthread -pipe

G++:

-Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -fno-omit-frame-pointer -fexceptions -D_FORTIFY_SOURCE=2 -fstack-protector --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -fprofile-use -fprofile-correction -Wcoverage-mismatch -O3 -fomit-frame-pointer

Build:

--enable-application=browser --enable-update-channel=release MOZILLA_OFFICIAL=1 CC=x86_64-solus-linux-gcc CXX=x86_64-solus-linux-g++ 'BINDGEN_CFLAGS=-I/usr/include/nspr -I/usr/include/pixman-1' --enable-system-ffi --enable-default-toolkit=cairo-gtk3 MAKE=make --enable-system-hunspell --enable-crashreporter --enable-official-branding --enable-pie --enable-startup-notification --disable-strip --enable-system-pixman --with-system-sqlite --disable-updater --prefix=/usr --with-system-bz2 --with-system-jpeg --with-system-libevent --with-system-libvpx --with-system-zlib
ikey added a comment.Nov 20 2017, 10:49 AM

Immediate things of interest:

  • Mozilla use --enable-elf-hack & --enable-rust-simd
  • We have lots more flags.
  • They don't appear to perform any hardening on their build.
ikey added a comment.Nov 20 2017, 10:52 AM

Considerations: Allow Firefox to continue to build its own NSS/NSPR, also allow SQLite, enable elf hack and rust SIMD

I found something interesting! After reading this https://hacks.mozilla.org/2017/11/comparing-browser-page-load-time-an-introduction-to-methodology/, I thought I should try Firefox with Ublock Origin disabled and Tracking Protection set to Always, and it looks like most ads are blocked on websites, and the pages load fast as well !
Anyone else see dramatic improvements ?

mate-user,

Tried your suggestion, and I'm seeing Peacekeeper & Browserbench #'s that are approximately even with the testing screenshots that I posted above for the latest FF build release from Solus.

I'm interested the information you provided about uBlock & Tracking Protection, and will definitely try it. If I can eliminate an add-on, that would be great.

ikey,

Thanks for your work on FF57 today.

GM

mate-user,

After disabling uBlock & enabling Tracking protection, I picked up about a one second advantage in cold booting FF. Unfortunately, Tracking protection didn't do much in terms of ad blocking for me on sites that I use often. One example is YouTube. So, I just had to re-enable uBlock. That one second advantage was likely due disabling the ad blocker.

GM

ikey added a comment.Nov 21 2017, 3:13 AM

Once we have our core rebuilds in later and our kernels, I'll rebuild the dependent stack for Firefox with our new distro flags and then rebuild Firefox itself. After that it should be absolutely blazing

Gale force winds...blowing into the sails of Solus. ;)

In T4966#91347, @ikey wrote:

Once we have our core rebuilds in later and our kernels, I'll rebuild the dependent stack for Firefox with our new distro flags and then rebuild Firefox itself. After that it should be absolutely blazing

Macro youdarealmvp:

@GreenMartian I also noticed ads still showing on YouTube sometimes so now I've enabled tracking protection to Always and also enabled Ublock Origin.

@ikey Thanks for the quick update and releasing it today! I went to about:config and noticed the servo setting was still there as I had set it, to false. I reset it to default and the value was blank and now when I search, there are no results for servo or stylo! At least nobody can enable servo and try to give Solus a bad name, haha :)

@ikey I think this task here T4966 should be a subtask of T5083. Right now it's the other way around.
And this task can be marked as Resolved, right ?

@mate-user No, it shouldn't be a sub-task, because the build flags need to be addressed first, which means it's a sub-task.

ikey added a comment.Nov 22 2017, 6:53 PM

How is Firefox for people now? Do we want this closed or..?

Firefox is definitely fixed for me, i think we can close... 🔥🦊

I haven't compared with other install but I can tell I feel the difference !

ikey closed this task as Resolved.Nov 22 2017, 7:53 PM
ikey claimed this task.

Alright thanks guys ! Sorry about that ..

GreenMartian added a comment.EditedNov 24 2017, 8:07 AM

After updating to the latest release, just thought I'd follow up by posting numbers for Browserbench and Peacekeeper.

Looks like my performance of FF 57 has actually regressed since the latest update.

I know this task was closed as resolved, but just wanted to make sure these follow-up results made it to thread. Unsure that opening a new task is what you'd prefer...

I've run each test twice.

In contrast & to be a little different this time, here are results with Firefox "Nightly" (as opposed to FF 57 earlier in this thread) directly from Mozilla...

kyrios123 added a comment.EditedMar 14 2018, 7:28 PM

Update with Firefox 59.0
stylo disabled

stylo enabled

I would say that it should be turned back on but I need to test it a bit more first 😅

ermo added a subscriber: ermo.Mar 15 2018, 4:05 PM

@kyrios123

Suggestion:

If you didn't already switch to using the performance governor when running those tests, you should probably do so.

I'm not sure you can rely on the behaviour of ondemand when running those benchmarks...

joebonrichie added a subscriber: joebonrichie.EditedMar 15 2018, 5:19 PM

Firefox 59
I did some benchmarks against a local build of firefox with --enable-rust-simd, --enable-elf-hack, --enable-stylo against the official firefox 59 tarball

http://browserbench.org/JetStream/

Solus: 187.62Official tarball: 199.01

http://www.robohornet.org/#

Solus: 0152.46Official tarball: 0179.46

http://browserbench.org/Speedometer2.0/

Solus: DNFOfficial tarball: 67.6

http://browserbench.org/Speedometer/

Solus : 83.31Official tarball : 94.0

Yeah, quite a big difference in my opinion 😑

With the PGO data workload mostly fixed via Xvfb to run headless tests the scores are about even now. This is firefox 59 not 59.1

http://browserbench.org/JetStream/

Solus: 201.40Official tarball: 197.64

http://www.robohornet.org/#

Solus: 0172.16Official tarball: 0175.45

http://browserbench.org/Speedometer2.0/

Solus: DNF again stuck on test 14Official tarball: 67.6

http://browserbench.org/Speedometer/

Solus : 99.90Official tarball : 95.1

Looks very promising !