Keepassxc-browser: High CPU usage on Firefox 74.0

Created on 30 Mar 2020  路  17Comments  路  Source: keepassxreboot/keepassxc-browser

Expected Behavior



The KPXC plugin should have a negligible impact on the performance of Firefox 74.

Current Behavior



KPXC-Browser on some pages (e.g. etherpad) constantly increases its processor usage until FF74 grinds to a halt. This can be verified through the about:performance page

Possible Solution


Steps to Reproduce (for bugs)


  1. Have FF74 with the latest version of the KPXC-B
  2. Keep FF's about:performance tab open
  3. Create a document on e.g. etherpad.devol.it and type on it for a while
  4. See the plugin's "Energy impact" stat increasing more and more and making the browser unusable until a) a while after stopped typing or b) the plugin has been disabled.

Debug info


KeePassXC - 2.5.3
KeePassXC-Browser - 1.6.2
Operating system: Arch Linux
Browser: Firefox

Screenshot_2020-03-30_19-00-38

PR pending bug

Most helpful comment

@varjolintu that fixed it for the Wikipedia example and also the self-hosted commercial timesheet software my workplace uses! I compared htop while using Firefox with/without the extension enabled and don't notice any difference.

All 17 comments

Thanks. I'll check this ASAP.

It is giving me problems too, but mainly on pages with (I think) DOM changes, e.g. some web chat apps.
image

It would be great to debounce the MutationObserver (not done ATM?):
https://github.com/keepassxreboot/keepassxc-browser/blob/11472925eef4575ac2b46293e2bcf728a53aa2dd/keepassxc-browser/content/keepassxc-browser.js#L823-L835

I had some issues with the blacklist of some sites but got it working now. Maybe the procedure is not clear in the documentation / settings.

It will work it you go to Settings (moz-extension://640677b3-c40c-42bc-9ebc-57eb5ab7e849/options/options.html#site-preferences) -> Site Preferences (would be nice if the deep-linking would work) -> Add URL manually -> type in the site _(ending on /* to be sure)_ -> Add, Ignore: Disable all features, now reload all the tabs that had this site/url open.

@bwbroersma Debouncing would definitely help. For this issue I made a PR that ignores any changes made directly to the main HTML element. This particular Etherpad page made constant alterations to the main HTML element via scripts, and that's just non-useful info for the extension.

I wonder if my chat app problems are also solved by this. I also had some issues with disabling a specific site, because I didn't knew I had to add /* at the end of the URL to get it matched because of the $ in matchPatternToRegExp:
https://github.com/keepassxreboot/keepassxc-browser/blob/11472925eef4575ac2b46293e2bcf728a53aa2dd/keepassxc-browser/global.js#L96-L98

@bwbroersma You can download the branch and load it temporarily to your browser (just disable the stable installed version before testing).

I don't know how helpful it is, but I get the same message when using Glowing Bear, when it loads a bunch of messages from an IRC channel.

@baldurmen I'll test that one too.

@baldurmen I didn't see any big issues with Glowing Bear, but I suggest you try the branch yourself and see if the fix works for you.

@varjolintu I've loaded the branch and I can confirm:

  1. Keepass still works properly ;)
  2. it seems to fix the problem I'm seeing

Cheers!

@baldurmen Excellent! Thank you for testing the fix.

I get this issue on Wikipedia revision history pages with lots of entries, when clicking on the radio buttons to select two revisions to compare the diff between them. For instance this page.

I've tried the branch in Firefox using web-ext, and it doesn't solve the issue on the wikipedia page @brndd linked to.

@pklapperich I'll see what I can do. The fix for this is not finished yet.

@pklapperich Please re-try the branch.

@varjolintu that fixed it for the Wikipedia example and also the self-hosted commercial timesheet software my workplace uses! I compared htop while using Firefox with/without the extension enabled and don't notice any difference.

I still get this, particularly with Google Docs, but I am on 77.0.1.

@zzenonn We are already tracking this issue here: https://github.com/keepassxreboot/keepassxc-browser/issues/888

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dgnuff picture dgnuff  路  3Comments

Generator picture Generator  路  5Comments

tolot27 picture tolot27  路  5Comments

gwerbin picture gwerbin  路  4Comments

brwolfgang picture brwolfgang  路  4Comments