Keepassxc-browser: High CPU usage on Firefox with 1.6.x

Created on 20 May 2020  路  16Comments  路  Source: keepassxreboot/keepassxc-browser

Since the keepasxc-browser was upgraded to 1.6.0 (might be 1.6.1), in certain applications performance is really bad. Sometimes with 100% CPU usage on one core for multiple seconds and a really slow responding application. Sometimes leading to Firefox suggesting to temporarily disable the Keepassxc-browser add-on.
This CPU usage and slow response disappears when I disable the add-on.

Some alleviation of this issue has been reached in 1.6.3 (see issue #835), but the situation has not been fixed for all applications.
I experience the same issue on both Windows 10 and Fedora 31/32, which are different PC's that have a CPU capable enough and didn't present this issue < 1.6.0.

Expected Behavior



I expect the keepassxc-browser add-on to have a minimal impact. As it has been < 1.6.0.

Current Behavior



At the moment, in some apps, the performance impact gets so bad, I have to switch off the add-on to get back performance.

Possible Solution



Observations:

  1. This issue mainly seems to concentrate around applications that work with large numbers of dynamic rows/tables with data.
  2. The CPU usage isn't attributed by Firefox to the keepassxc-browser add-on, but to the actual application tab. When disabling the add-on, though, response time and cpu usage are greatly reduced.
  3. The issue increases in time: at the end of the working day, when firefox is open for longer, the issue is more present: the cpu spikes and the response delays are longer.

Steps to Reproduce (for bugs)



I still have major issues when using PhpMyAdmin, and then especially when filtering the folder list when there are a lot of foldrs in a database, for example.
I also have major issues with the Kopano Webapp when working with larger numbers of e-mails and calendar appointments.

Debug info


KeePassXC - 2.5.4
KeePassXC-Browser - 1.6.3
Operating system: Win & Linux
Browser: Firefox

bug

Most helpful comment

1.6.5 is now released with several fixes to this issue. Please report if you are still having problems and I'll reopen the issue.

All 16 comments

Does it help at all if you disable the _Dynamic input field detection_ or add your site to Site Preferences and choose _Disable all features_?

I have the same issue on an Ubuntu GNOME 20.04 with the latest Firefox installed. Seems to happen on big websites with lots of form fields like Facebook, Twitter and other social networks.

@varjolintu Disabling Dynamic input field detection doesn't really seem to do anything to solve this behaviour.
Tonight I'll try changing these settings on my laptop, which has less CPU power and the effect is more pronounced.

I'm also interested if this can be reproduced with Chromium.

And also: test this with a new temporary Firefox profile.

http://music.youtube.com is heavily impacted by add-on.

I was wondering why entire interface of the site was "very hangy" (ie Right click menu taking 2-3 seconds to display and clicking nearly anything has a similar delay)

It wasn't until that Firefox warned (via yellow infobar under the address bar) keepassxc-brower add-on was causing the page to hang.

After adding the following in the add-on settings, the overall performance of the site is noticeably improved.
image

What I find interesting is that I did not have Keepass-XC open/connected, I assumed (apparently incorrectly) that the add-on isn't "active" unless it's connected to a database.

In any case this is very notible issue that led me to add my two cents.

_KeePassXC - unknown_ ---- again I did not have KeePassXC open
KeePassXC-Browser - 1.6.3
Operating system: Win32
Browser: Mozilla Firefox 77.0

@kmg90 Thanks for letting us know. This helps narrowing down the issue.

This also seems to happen to me on a website doing a lot of dynamic things with tables which causes firefox to take ages to repaint the content. Disabling Dynamic input field detection interestingly removes nearly all overhead for me.

@Findus23 That's logical because the bug is in the dynamic input field detection. It still handles too much elements.

I'm seeing this behaviour on Reddit. I guess the dynamic input field detection doesn't like "infinite scroll" websites.

Linux/Firefox. KeepassXC 2.5.4, KXCB 1.6.4.

Just as others have mentioned: after disabling Dynamic input field detection, I don't encounter any issues anymore. So I'm pretty sure that's the culprit.

Hope that focusses the search for a solution a bit.

The exact problem is that the Dynamic input field detection has too much dynamic content to handle. The only way to solve this is try to reduce the amount with some additional rules, or adding an interval for the processed content. I'm currently investigating what method would really be the best one for this.

Disabling the _Dynamic input field detection_ or adding the URL to Site Preferences (and disable all) are only the workarounds for now.

I finally made a patch for this. It might not remove all of the problems but it should help. Give it a try if you can:
https://github.com/keepassxreboot/keepassxc-browser/pull/920

1.6.5 is now released with several fixes to this issue. Please report if you are still having problems and I'll reopen the issue.

This seems to be fixed indeed. I had noticed a lag with sending messages in KiwiIRC after the history buffer grew to a certain size in a channel. Disabling the KeepassXC addon got rid of the lag. After varjolintu's fix landed in a release, I immediately enabled the addon. I have not experienced the lag since. Thanks a lot.

@mestaritonttu Excellent news!

Was this page helpful?
0 / 5 - 0 ratings