Closed Bug 1633543 Opened 4 years ago Closed 4 years ago

Loading html.spec.whatwg.org freezes the whole window with Dark Reader

Categories

(WebExtensions :: Developer Outreach, defect)

x86_64
Windows 10
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: saschanaz, Unassigned)

References

Details

Basic information

Steps to Reproduce: Load html.spec.whatwg.org

Expected Results: The parent window should always be responsive

Actual Results: It becomes unresponsive


More information

Profile URL: https://perfht.ml/35ctyl2

Basic systems configuration:

OS version: Windows 10 2004

GPU model: Intel Iris Plus (i7-1065G7)

Number of cores: 4

Amount of memory (RAM): 16 GB

Thanks so much for your help.

The profile paints a very clear picture: It's because of the Dark Reader extension.

Oh, well, Dark Reader is what's causing the content process to be slow. As for the "freezing the whole window" issue, that seems to be due to accessibility. You can check what caused accessibility to be used by going to about:support; sometimes the Accessibility section has a reasonable value for "Accessibility Instantiator".

Oh, well, Dark Reader is what's causing the content process to be slow.

This part is expected, as the page itself is quite large and slow even without Dark Reader.

As for the "freezing the whole window" issue, that seems to be due to accessibility.

Do you think Bug 1626789 is related? Accessibility is also pointed as a cause there, and weirdly the mentioned value is "UNKNOWN".

Accessibility
Activated 	true
Prevent Accessibility 	0
Accessible Handler Used 	true
Accessibility Instantiator 	UNKNOWN|
Flags: needinfo?(mstange)

Oh right, that bug is actually where I got the about:support hint from. I didn't realize it was you reporting both bugs :)

It might be the same underlying issue, yes.

Flags: needinfo?(mstange)

If possible Kagami, can you take a new profile without the Dark Reader extension enabled?

Here it is: https://bit.ly/2W7dUU7 (The profiler uses bit.ly now? 👀)

(In reply to Kagami :saschanaz from comment #6)

(The profiler uses bit.ly now? 👀)

(only until the end of the month. Our free bitly account allows 500 branded URLs per month. it's being fixed)

:saschanaz, in bug 1626789 comment 25, you noted that disabling a11y "solved" this bug 1633543. Even though the UI no longer freezes, I assume there are still other symptoms experienced due to the slow content process?

Flags: needinfo?(krosylight)

I assume there are still other symptoms experienced due to the slow content process?

Not sure, do you have any potential issue in mind? The content process is just slow and I think that's all.

Edit: From Bug 1626789#c22:

Certainly, that would impact other things; e.g. if you scroll outside of the area rendered for APZ, try to click a link, etc.

Ah yes, that happens, yes.

Flags: needinfo?(krosylight)

At this point, it seems like the Dark Reader extension is now the only factor contributing to the slow down of the content process.

Hey zombie, do you know if there's a way of reaching out to the Dark Reader extension author to let them know about this? I wonder if the extension could do its work in batches, rather than blocking the main thread for so long. Or perhaps there's a faster technique it could use for darkening things.

Flags: needinfo?(tomica)

Hi Alexander, could you please take a look here?

Between Mike Conley and me, we could probably answer a lot of the questions related to performance and extensions, but I'm not sure I can offer any upfront/universal advice that we're sure would help, but wouldn't have any downsides in some other circumstances.

Flags: needinfo?(tomica) → needinfo?(shutovby)

Hi, we are constantly seeking for ways to improve the performance in Firefox https://github.com/darkreader/darkreader/issues/535

Here is an example of a code block, that used to block some pages for 30s https://github.com/darkreader/darkreader/commit/09b24d052e07fd4492575cd01da2ac1fef51cf6c

I keep seeking for such weak places. The issue doesn't happen in Chrome.

Flags: needinfo?(shutovby)

Kagami, if you see the slowness without the extension, could you file a separate bug about that (perhaps in accessibility component if that is the reason).
Making this bug be about the extension.

Component: Performance → General
Flags: needinfo?(krosylight)
Product: Core → WebExtensions
Summary: Loading html.spec.whatwg.org freezes the whole window → Loading html.spec.whatwg.org freezes the whole window with Dark Reader

Filed Bug 1637951.

Flags: needinfo?(krosylight)

This looks like an issue with the extension. The extension developer has been notified (and replied in comment 12), so I'm closing the bug.

If you need more help, feel free to ask or file a new bug for the parts that are actionable for us.

Component: General → Developer Outreach

Hi,

We've made several performance improvements in Dark Reader, they will be released soon.

Several performance bottlenecks were discovered in Firefox:

  1. Slow for ... of loop https://jsben.ch/kidOp
  2. Slow spread operator in combination with Array.push https://jsben.ch/nr9OF
  3. Slow Array.from https://jsben.ch/FJ1mO
  4. Slow NodeList.forEach and slow NodeList.length in for loop https://jsben.ch/yZpKU

Finally the problem with html.spec.whatwg.org is that it has huge amount of DOM nodes. But now it loads for ~20s.

Thanks for the update.

Please let us know if there is anything else that we should fix.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME

Thanks, I think the items 1 and 2 match these bugs, while 3 and 4 look worse in Chrome:

Depends on: 1383364, 1382370
You need to log in before you can comment on or make changes to this bug.