Closed Bug 1694048 Opened 4 years ago Closed 1 years ago

Reddit Become Slower

Categories

(Core :: JavaScript Engine, defect, P3)

Firefox 85
defect

Tracking

()

RESOLVED DUPLICATE of bug 1689392
Performance Impact high
Tracking Status
firefox90 --- affected
firefox91 --- affected
firefox92 --- affected

People

(Reporter: yoasif, Unassigned)

References

(Blocks 2 open bugs)

Details

(4 keywords, Whiteboard: [sp3])

Report from Reddit: https://www.reddit.com/r/firefox/comments/lp0rwa/slow_reddit_become_slower/

Basic information

Steps to Reproduce:

I only have multi acc container as my addons. I use nextdns adblock as my adblocker.

Expected Results:

I don't encounter this on edge chromium or chrome browser, browsing and rendering is very fast, click click click under 1s every pages I go in new reddit is shown directly

Actual Results:

on FF it need about 3-5s for each page, sometimes result on high CPU


More information

tried on private or new profile result the same, it will be worst in new profile without DoH adblock

Profile URL: https://share.firefox.dev/3aH547S

Basic systems configuration:

OS version: Windows 10 20H2 (19042.804)

GPU model: NvidiaGT540M 1Gb

Number of cores: 4core 8 Thread Intel i7-2670qm with 10 Processes and HW Acc enabled

Amount of memory (RAM): 16gb Crossair Value DDR3L 1666Mhz 2017

Thanks so much for your help.

That indeed looks quite terrible. The profile doesn't contain any C++ stacks unfortunately.

I've asked for another profile with native stacks on the reddit thread.

Basic systems configuration:

OS version: Windows 10 20H2 (19042.804)

GPU model: NvidiaGT540M 1Gb

Number of cores: 4core 8 Thread Intel i7-2670qm with 10 Processes and HW Acc enabled

Amount of memory (RAM): 16gb Crossair Value DDR3L 1666Mhz 2017

Trying on New Profile without DoH the result is worst than ever.
Anyway privacy set to strict on each site.

Hmm, there was devtools open while profiling?
That adds always significant overhead. Could you profile without devtools?
(I was looking at the "Platform")

Flags: needinfo?(BLBENYAMIN9)

https://share.firefox.dev/3r4WMNa
Hope that help. I test it vs Edge Chromium Version 88.0.705.81, In Edge I only need one click, 1s open for almost any pages. Same network, same laptop/computer, same bare addons and edge get lower adblock using only adguard DoH, firefox use NextDNS DoH.

Flags: needinfo?(BLBENYAMIN9)

Some of the slowness seemed to be caused by slow JS, such as a lot of time the content process was stuck at handling readystatechange handler.

In addition to the slow JS, we were also slow at getting responses from https://gateway.reddit.com/desktopapi/v1/subreddits/firefox?....... requests, which was required to load the content of Reddit I think. For instance, there was a time that we waited 11.5 seconds for this request https://share.firefox.dev/3dWG66x, and the page was basically blank during that period. This request took 8.3 seconds for Http response, not sure what this means.

Nah is there anyway to improve it? I mean my laptop is potato, i7 2670qm ia really too old to handle basic web I think. But edge could do better. The network speed also same as I connect to the same wifi. Worst case, does Reddit use bad code that only optimized for Chromium?

Thanks.

Severity: -- → S2
Priority: -- → P3

(This is blocking the generic Reddit bug)

(In reply to Olli Pettay [:smaug] from comment #8)

(This is blocking the generic Reddit bug)

What does that mean? Does it mean it's my fault?
I tried to reproduce the bug on multiple computer and result the same.

On i5-8250U, i3-7300U, i5-4300U, i7-2670qm, i3-2330m, i3-2300 (Most system on SSD SATA from samsung EVO, some on NVMe, all of the device have 16gb ram, which is sufficient for it)
On most of the system new reddit only usable on Chromium based browser, at least it doesn't load very slow.

The only resort for now is stay away from new reddit, and I did turn off new design on https://www.reddit.com/prefs, so my reddit will go to old one for now. But if this continue, I think Moz/FF really need to phone reddit team and talk about it. It's not cool to only optimize code on Chromium and doesn't even test it or optimize it for FF.

It means we're investigating how to make Reddit faster in Firefox.

(In reply to Olli Pettay [:smaug] from comment #10)

It means we're investigating how to make Reddit faster in Firefox.

Hello, I don't know if it will add value or not to this issue. I'm on Stable channel and I just enabled WebRender forcibly yesterday. I seen noticeable faster page rendering in New Reddit, but still there're CPU spike, I just guess that's Javascript unoptimizeable code on Gecko, and seems chromium base still fast 1s than Firefox, but it felt better than before it could be 3-4s slower without webrender. I don't know if my Laptop i7-2670qm and GT540M potato contribute at that, but I use Chromium based on the same laptop, but at least webrender improve it a little.

I just hope people optimize their code on Firefox :'(

Do you have some very exact step to reproduce the slowness?
I'm having trouble to see any difference in Firefox and Edge on Windows 10. Well, back and forward seem to be slower on Edge.

When you see the slowness, have you logged in to the site?

Flags: needinfo?(BLBENYAMIN9)

(In reply to Olli Pettay [:smaug] (away May 1 - 8) from comment #12)

Do you have some very exact step to reproduce the slowness?
I'm having trouble to see any difference in Firefox and Edge on Windows 10. Well, back and forward seem to be slower on Edge.

When you see the slowness, have you logged in to the site?

Step to reproduce is :

  1. Make sure using new Reddit Design
  2. Using Firefox/gecko based browser
  3. Try to scroll on home of the reddit
  4. wait for the result, see CPU/GPU spike
  5. Sometimes while waiting, firefox is freezing (tested on clean profile, reproducable on 2nd gen intel, i5-2430m, i7-2640m, i7-2670qm, all using > 8GB ram). This will lead to 3-4s slower than edge, It's worsen of GPU render turned of. GPU render did help, but the spike sometimes quite high, you could see on the performance capture above.

The only ways for me now, I stay away from reddit if I use firefox, I use old reddit (but sometimes some ability isn't there, so I ditch it), use M$ edge for reddit. I keep using firefox for everything else.

anyway slowness also felt on every google family product that use Angular/ReactJS code. I don't know the underlaying, but most of site that rely on those heavy huge library, always resulting slowness on firefox, 1-2s, worst case 4-6s if it work with ajax/fetch/network.

Flags: needinfo?(BLBENYAMIN9)

Aha, a bit older cpus (from 2011).

How do I make sure I'm using the new reddit design? Is it the default these days?

(In reply to Olli Pettay [:smaug] from comment #14)

Aha, a bit older cpus (from 2011).

How do I make sure I'm using the new reddit design? Is it the default these days?

test is, old reddit is https://old.reddit.com, new reddit is https://new.reddit.com. anyway this happen with many website that, use a lot of js package, seems Firefox js renderer aren't too optimized for it (I seen multiple case not only on reddit, but on other google product, M$ product, etc, that use rendered/aht typescript build, and it's taxing the CPU), anyway I don't see any problem if, if I use lightweight pages, that isn't use any of those thing, on chrome, those builded js felt(yeah, I hasn't measure much, but 3-4s is really felt long, as people has un-normal standard for web browsing this day, they blame the browser for the slowness) slow, not terribly, but the respond time felt slow. Anyway webrender only move css rendernig to GPU right, how about GPU also render js? Does it make sense? Will it create a opportunities, or it's just not possible?

I just tried on an old i5-3317U/4GB machine (it does have an SSD), and I'd say both Edge and Firefox are rather slow with Reddit.
Edge has more checkerboarding when scrolling, but is loading new stuff faster when scrolling all the way down.
I did see several seconds long hangs in Edge.
But looking at a Firefox profile a bit.

(In reply to Olli Pettay [:smaug] from comment #16)

I just tried on an old i5-3317U/4GB machine (it does have an SSD), and I'd say both Edge and Firefox are rather slow with Reddit.
Edge has more checkerboarding when scrolling, but is loading new stuff faster when scrolling all the way down.
I did see several seconds long hangs in Edge.
But looking at a Firefox profile a bit.

Nah, do they did something for 'edge', that lead to that behavior? because the longer you scroll, it's faster on edge, and content loading are indeed faster on edge, I'm really curious (this happen on most react js/ angular 2+ based webpages, including reddit). Does JS compiler(TS I mean) are only optimized for CR based browser, not for spider monkey on firefox, which is really ra cist in some aspect.

This bug blocks 1707066, can the reporter add it as a blocking bug?

bug 1709216 Seems help a bit with React Real World performance, I still see slowness on some pages, but not much like before.

But sad thing is it's taxing GPU and CPU, I seen my CPU temp rise til 80C just browsing reddit. This doesn't happen on CrEdge, which is surprising (they kept fan and CPU quiet at 60C), browsing new reddit.

I have fission force enabled. Hopefully that isn't the case. Here is https://share.firefox.dev/2W9wyyo benchmark link. Hope this help

thanks for Yoasif and Nextbern to point bug 1709216, at least I seen improvement on Firefox. Hopefully it can beat Blink near future in JS ability without taxing CPU/GPU

Component: Performance → JavaScript Engine
Blocks: ReactDOMPerf
Severity: S2 → S3
Performance Impact: --- → ?

The Performance Impact Calculator has determined this bug's performance impact to be high. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: Windows
Impact on site: Causes noticeable jank
Page load impact: Some
Websites affected: Major
[x] Causes severe resource usage

Performance Impact: ? → high

Benyamin, curious, do you still see slowness? And if so, could you provide a new performance profile?

Flags: needinfo?(BLBENYAMIN9)

The severity field for this bug is set to S3. However, the Performance Impact field flags this bug as having a high impact on the performance.
:sdetar, could you consider increasing the severity of this performance-impacting bug? Alternatively, if you think the performance impact is lower than previously assessed, could you request a re-triage from the performance team by setting the Performance Impact flag to ??

For more information, please visit auto_nag documentation.

Flags: needinfo?(sdetar)
Flags: needinfo?(sdetar)

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #21)

Benyamin, curious, do you still see slowness? And if so, could you provide a new performance profile?

hello, In the end I give up using the new reddit, and use old reddit, but based on new Firefox 108.0 on Fedora that I use on Thinkpad X220, it's still slow, Sorry, I trully sorry for late response, the profiler should be This (Sorry using external link, because profiler.firefox.com reject the data, too large):
https://drive.google.com/file/d/1_lIM8CDb1t9HdWKODKuaxaMh7XkboxSP/view?usp=sharing

It's slower on Fedora for some reason (I haven't tried the tarball, I use from the repo), but chromium based browser (vivaldi, credge), noticeably faster loading new reddit... sadly. I will kept using old.reddit.com for now, as It's a well known issue on Firefox for more than 3 year as long as I remember, because people kept talking about it. I hate all web nowdays are based on js... it's too taxing...

Flags: needinfo?(BLBENYAMIN9) → needinfo?(smaug)
Whiteboard: [sp3]

I saw someone sharing this bug on reddit and saying to share a performance profile so here is mine.

https://share.firefox.dev/3ZTI9g3

Loading posts on Reddit are noticeably slow. Replying to posts, the text appearing on screen is lagging behind my physical typing. Going from a post back to my feed/home page on Reddit is also noticeably slow.

Duping this to the existing Reddit performance metabug.

Status: NEW → RESOLVED
Closed: 1 years ago
Duplicate of bug: reddit-performance
Flags: needinfo?(smaug)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.