keepassxc-browser icon indicating copy to clipboard operation
keepassxc-browser copied to clipboard

KeepassXC-Browser extension Slowing Down Firefox ESR 140.3 on Reddit.com with Lightbox

Open master-bob opened this issue 3 months ago • 22 comments

Have you searched for an existing issue?

  • [x] Yes, I tried searching and reviewed the pinned issues

Brief Summary

After an update to Firefox ESR 140.3 a slow down warning is shown under certain conditions, definitely on a reddit page with a lot of comments when opening the lightbox. It occurs under other circumstances, but the before is consistent.

Example of the warning: Image

This behavior did not occur on Firefox ESR 128.14.

Expected Versus Actual Behavior

Actual Behavior

The lightbox opens slowly and a slow down warning by Firefox is shown.

This works slowly on a page with a lot of comments.

Expected behavior

I do not expect to see a slow down warning from Firefox.

This works correctly on this page.

Steps to Reproduce

  1. Browse to a page with a lot of comments, for example
  2. Click on the image (it is of a person in a bikini)
  3. Wait to for the lightbox with a larger image to open
  4. as it opens the slowdown is shown
  5. close the image using the X in the top right
  6. See the slowdown occur again

KeePassXC-Browser Debug Information

KeePassXC - 2.7.10
KeePassXC-Browser - 1.9.9.6
Operating system: Linux x86_64
Browser: Mozilla Firefox 140.0 w/ Betterfox

master-bob avatar Sep 23 '25 18:09 master-bob

Strange. The Firefox version shouldn't matter here. Does this happen without the Betterfox?

varjolintu avatar Sep 23 '25 19:09 varjolintu

Strange. The Firefox version shouldn't matter here. Does this happen without the Betterfox?

Welp.... good news it doesn't happen without Betterfox. Better news, 😉, it doesn't happen now with betterfox.

Maybe I'm having firefox profile issues? All I've done since the report was close the lid of my laptop, a la suspend. Upon opening it to respond to you on attempting to browse to about:profiles Firefox hanged, so I forced quit. I tried a couple times to open about:profiles before loading a Betterfox-free profile manually via firefox -P with Firefox closed. Then I tested the same page linked above, and did not get the error. I then tested with Betterfox and still did not get the error.

If it happens again, I'll update, but as it stands ¯\_(ツ)_/¯.

I'll leave this open for a bit, and if it doesn't happen again I'll Close this ticket.

EDIT: okay it happened with Betterfox again. But it's not consistent. On the aforementioned page I had a noticifcation, so I clicked it and got the warning. But the lightbox warning does not arise.

EDIT2: Okay, it happens without Betterfox. It's not quite consistent as well. but I went to reddit.com -> Popular -> Searched for a post with an image and thousands of comments -> selected one -> Read some comments and then went back, and as the page was loading scrolled down and saw the warning before the page loaded. It happened one more time, but the conditions where less clear.

master-bob avatar Sep 23 '25 20:09 master-bob

Tangentially there may be another bug as there is a mismatch between what Firefox reports for it's version (140.3) and what the KeepassXC-Browser debug reports (140.0).

Image

master-bob avatar Sep 23 '25 20:09 master-bob

I'm gonna try to check it out if I can have it reproduced with a post that has a lot of comments.

varjolintu avatar Sep 24 '25 04:09 varjolintu

I'm getting the exact same issue on regular Firefox.

KeePassXC - 2.7.10
KeePassXC-Browser - 1.9.9.6
Operating system: Linux x86_64
Browser: Mozilla Firefox 143.0

pixup1 avatar Sep 25 '25 15:09 pixup1

I've been experiencing similar issues on the last few releases of LibreWolf as well. Reddit seems to be where it generally happens.

KeepassXC-Browser: 1.9.9.6
KeepassXC: 2.7.10
LibreWolf: 144.0-1
OS: Windows 11

cco avatar Oct 16 '25 02:10 cco

Glad I'm not going crazy, I'm running into this myself on multiple machines, including Arch and Kubuntu Linux and an M1 Mac on current Mac OS. It does also mostly seem to be on Reddit.

KeepassXC versions are 2.7.9 and 2.7.10 KeepassXC-Browser is 1.9.10 Firefoxes are stock versions, 144.0.

Scoth42 avatar Oct 23 '25 22:10 Scoth42

Glad I'm not going crazy, I'm running into this myself on multiple machines, including Arch and Kubuntu Linux and an M1 Mac on current Mac OS. It does also mostly seem to be on Reddit.

KeepassXC versions are 2.7.9 and 2.7.10 KeepassXC-Browser is 1.9.10 Firefoxes are stock versions, 144.0.

@Scoth42 , If possible would you please mention what are the other websites you have seen this occur?

master-bob avatar Oct 29 '25 00:10 master-bob

@Scoth42 , If possible would you please mention what are the other websites you have seen this occur?

I can't be completely sure about it since it can be a bit slow on its own but I'm pretty sure I've seen it on https://www.theautopian.com/ on articles with lots of comments. I haven't been able to reproduce it as definitively as reddit where back/forwards can take several seconds with the extension enabled but are nearly instant with it off.

Scoth42 avatar Oct 31 '25 01:10 Scoth42

This might be related to some template elements, like SHREDDIT-COMMENT on Reddit. We ignore basic comment-types, but only check them with the exact name. It could help if we use .includes() instead of a exact comparison.

varjolintu avatar Nov 02 '25 09:11 varjolintu

I was able to pretty reliably reproduce the slowdowns I had been experiencing. Just by hitting the page back button firefox would hang for about 5 seconds. I started the profiler right before I hit the back button and hit end right as the page finally loaded.

Attached is a profiler https://share.firefox.dev/49yI4qw EDIT: Rest of the message

MissPotato avatar Nov 04 '25 08:11 MissPotato

I'm gonna do a draft of the fix soon. Those who can reliably reproduce this error can then try it. I still haven't seen this behavior.

varjolintu avatar Nov 04 '25 08:11 varjolintu

You can try this patch for testing: https://github.com/keepassxreboot/keepassxc-browser/pull/2745

varjolintu avatar Nov 04 '25 18:11 varjolintu

Hopefully I'll have some time to poke at this, I don't have a good dev setup or way to test patches going but hopefully will have some time to try to get the change into my browser and give it a try, if someone else doesn't beat me to it.

Scoth42 avatar Nov 06 '25 16:11 Scoth42

My preliminary testing is positive. But as the testing is just using reddit, more time is needed to be more conclusive.

Hopefully I'll have some time to poke at this, I don't have a good dev setup or way to test patches going but hopefully will have some time to try to get the change into my browser and give it a try, if someone else doesn't beat me to it.

@Scoth42, if you have time to install it, it's quite simple:

  1. Export KeepassXC Extensions Settings (Optional)
    • KeepassXC-Browser Preferences -> Bottom of first page (General)
  1. Disable Current Extension
  2. Clone the repository
    • git clone https://github.com/keepassxreboot/keepassxc-browser.git
  1. Checkout the branch, fix/ignore_partial_nodenames
    • git checkout -b fix/ignore_partial_nodenames
  1. Copy dist/manifest-firefox.json to keepassxc-browser/manifest.json
  2. Load the new add-on
    • go to about:debugging -> This Firefox (on left) -> Load Temporary Add-on -> select keepassxc-browser/manifest.json
  1. Test

The extension will remain present as long as Firefox is still running. When it quits, the the temporary extension will be removed

master-bob avatar Nov 07 '25 20:11 master-bob

Okay. It just occurred again. I was on a reddit page with 619 comments, I had a notification, and then I clicked the notification icon; as the page was loading, the slow down occurred.

Edit: It occurred another time..

master-bob avatar Nov 08 '25 00:11 master-bob

I'm also experiencing this with various websites.

najtin avatar Nov 08 '25 23:11 najtin

Me too, but the problem persists at least for months. I could not figure out, why my Firefox slowed down, after a while... yesterday I disabled this extension and WOW, It is so fast!! 🤣 I thought that, the Reddit and big sites are so slow, 64 GB of RAM (and 8 GB of video memory) is not enough.

7system7 avatar Nov 09 '25 06:11 7system7

You can try disabling "Advanced settings -> Use dynamic input field detection" for a quick workaround and see if it affects. I'm pretty sure some custom elements in Reddit pass our inspector and causes this. If the problem still occurs even with the patch, I haven't been able to identify them all.

varjolintu avatar Nov 09 '25 07:11 varjolintu

Thank you! But without that, (for me) there are not many advantages to the extension. Instead of a workaround, I will wait for the fixes. But the problem is certainly big enough, because on this config it was damn annoying: (I cut off the irrelevant rows)

                `ooo/                    OS: Arch Linux x86_64
               `+oooo:                   Kernel: Linux 6.17.7-arch1-1
              `+oooooo:                  Uptime: 3 days, 57 mins
          `/++++++++++++++:              DE: GNOME 49.1
         `/+++ooooooooooooo/`            WM: Mutter (Wayland)
 `+sso+:-`                 `.-/+oso:     CPU: 13th Gen Intel(R) Core(TM) i9-13900K (32) @ 5.80 GHz
`++:.                           `-/+/    GPU: AMD Radeon RX 6600 [Discrete]
.`                                 `/    Memory: 29.96 GiB / 62.10 GiB (48%)
                                         Locale: en_GB.UTF-8

Do you have any suggestion, next time how to figure out which browser extension is bugging? Because the browser's process explorer did not help at all.

Yesterday, I found out completely by accident, because the Firefox wrote on the top, the KeepassXC slowing down my whole browser.

Edit: I forgot the Passkey functionality. :( So... I have to try as you said above...

7system7 avatar Nov 09 '25 07:11 7system7

@7system7 Previously Firefox had a Task Manager that showed memory and CPU consumption of each extension. Seems they have removed that at some point. I guess the only thing is to use the profiler instead.

varjolintu avatar Nov 09 '25 07:11 varjolintu

I don't think that the number of comments is that important. I'm going from a thread with just 36 comments to notifications (takes 2 seconds), then hitting back button takes 21 seconds. CPU is using one full core more for the duration. (all in the 'new' reddit design, I don't have those problems in old.reddit)

Tiavor avatar Nov 23 '25 10:11 Tiavor