HUD Service high CPU usage with Firefox

Bug #1005174 reported by Leonardo Torok
222
This bug affects 49 people
Affects Status Importance Assigned to Milestone
Application Menu Indicator
Confirmed
Low
Unassigned
Unity
Confirmed
Low
Unassigned
firefox (Ubuntu)
Invalid
Undecided
Unassigned
indicator-appmenu (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

When using HUD to access Firefox menus, it will use a high amount of CPU (around 70%), even after Firefox is closed. It looks like its trying to index Firefox menus (speacially the bookmarks menu, that has a lot of entries).

Steps to reproduce:
- You need a Firefox install with hundreds of bookmarks.
- Start Firefox
- Start the Hud and try to search a item that it's on your bookmarks menu.
- See the high CPU usage of unity-pane-service and hud-service.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity 5.12-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic i686
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,gnomecompat,mousepoll,resize,place,imgpng,grid,vpswitch,regex,move,wall,session,animation,wobbly,expo,workarounds,ezoom,animationaddon,fade,scale,unityshell]
Date: Sun May 27 11:00:50 2012
SourcePackage: unity
UpgradeStatus: Upgraded to precise on 2012-04-28 (28 days ago)

Revision history for this message
Leonardo Torok (leotorok) wrote :
Omer Akram (om26er)
affects: unity (Ubuntu) → indicator-appmenu (Ubuntu)
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

I don't have thousands of bookmarks, well, probably in the hundreds, so I don't have this problem. I don't see a reason why it should happen. Can anyone other than the original reporter confirm this issue?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds directly related to bug 987060.

Omer Akram (om26er)
tags: added: hud
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

That issue (bug #987060 ) is about memory leaks, which is quite different from a case where the CPU gets hogged.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I'm not sure we can really make this much faster now. The issue is that the HUD service sends events to all Firefox menus, and most of the CPU time is spent in dbusmenu

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Oh, the CPU usage is in the HUD service? In that case, there really isn't a lot for me to do here ;)

Revision history for this message
Sebastien Bacher (seb128) wrote :

Seems like an issue in very specific configs with lots of bookmarks then...

Changed in indicator-appmenu (Ubuntu):
importance: Undecided → Low
Changed in indicator-appmenu:
importance: Undecided → Low
Changed in unity:
importance: Undecided → Low
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Ruling out Firefox for now, as per Chris' comments above.

Changed in firefox (Ubuntu):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in indicator-appmenu (Ubuntu):
status: New → Confirmed
Revision history for this message
Leonardo Torok (leotorok) wrote : Re: [Bug 1005174] Re: HUD Service high CPU usage with Firefox

Actually, Firefox freezes too. It wouldn't be better simply disable HUD
when using Firefox or, at least, don't scan Firefox bookmarks menu? It's
actually redundant, since the address bar already does that. HUD is only
usefull to access the other options (File, Edit, Help, etc).

If it helps, my bookmark menu structure it's a few hundreds of
bookmarks, with subdirectories too.

Em 30-05-2012 19:12, Chris Coulson escreveu:
> I'm not sure we can really make this much faster now. The issue is that
> the HUD service sends events to all Firefox menus, and most of the CPU
> time is spent in dbusmenu
>

Changed in unity:
status: New → Confirmed
Changed in indicator-appmenu:
status: New → Confirmed
Revision history for this message
Michael (mnichau) wrote :

For me this makes HUD unusable in Firefox 13.0 (and 12.0 before that). I do have 748 bookmarks in 133 folders.

Intel® Core™2 Duo CPU T6400 @ 2.00GHz × 2
RAM: 3 GB

I was testing it by typing "new tab" in HUD (yes I know it's quicker with Ctrl+t).

The new tab took about 7 sec to show up and become responsive the first time round. With each repetition, the waiting time got longer. After a about 20-30 trials, the waiting time got to about 30-50 seconds (inconsistent) before Firefox became responsive again (it fades out after about 10 sec and comes back some time later).

I restarted Firefox and the hud-service and tried again, with the same results.

Using HUD to choose Firefox->Preferences also causes the browser to fade out and about 15-40 sec later the Preferences dialogue shows up and becomes responsive immediately or after about a 5-10 sec gap.

Using menus or keyboard shortcuts to produce a New Tab or get to Preferences produces immediate results even after a long session of HUD testing.

After the test:
hud-service: Memory = 381.3 MiB, Virtual Memory = 424.2 MiB

Revision history for this message
Vasilis Emmanouilidis (v.emman) wrote :

I have a lot of bookmarks, organised into folders of multiple levels. Every time I use Firefox, the computer becomes unresponsive after some time, even without invoking HUD. I see 100% CPU usage, most of it consumed by firefox and hud-service. This happens the same way to my 64-bit Ubuntu installation on my desktop and the 32-bit on my laptop.

In my opinion, that's a critical bug (and I feel very sorry to see it categorised as "low"), as it prohibits me (and anyone else in the same situation as me) from using my computer. I don't want to use another browser, neither get rid of my (through many years collected and organised) bookmarks. I prefer to switch to another distribution that doesn't have that ugly bug and doesn't make my computer completely useless, however much I love Ubuntu.

Please, fix that bug. In the first place, you could try not indexing the bookmarks through HUD. One can access their bookmarks through Firefox's awesome bar itself.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Hi, does the memory usage skyrocket and leak all over the place in addition to the CPU usage?

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Actually, as per the comments above, this truly is the same behavior as bug 987060. I'm duping it so we get more attention on a larger report.

Thanks for the patience, this bug SUCKS, but hopefully this will expedite the process.

Revision history for this message
M8R-6ct62c (m8r-6ct62c) wrote :

Same problem here. Firefox stops responding for 30 seconds or so. I have a bunch of bookmarks.

WORKAROUND:
-Go into the 'privacy' settings of ubuntu and
-disable tracking for websites
-and add firefox as an app to ignore
-log out/in

That seems to have solved it for me.

Revision history for this message
hoventaw (hoventaw) wrote :

I tried the recommendations by M8R-6ct62c above and the performance of Firefox on my machine has improved. It might improve further if hud-service stopped indexing my bookmarks.

Revision history for this message
LA (radiobuzzer) wrote :

I tried the recommendations by M8R-6ct62c but the performance of Firefox on my machine has improved but only slightly. The annoying part remains, every time HUD gets fired, I have to wait 2 minutes for firefox to load a page or do anything

Revision history for this message
Jason Robinson (jaywink) wrote :

I really do not think this is a duplicate of #987060. Can we remove this status?

After using the computer for a while I start getting this every time I switch to Firefox which has been running for some time. Memory usage itself is ok. Computer works fine, using or not using the HUD, but when I CTRL-TAB to Firefox, CPU jumps up and Firefox is very laggy for ~10-20 seconds and then CPU goes down and everything is fine. Until I switch to another window and then back to Firefox.

Really annoying, I know removing firefox global menu addon helps for this but I wouldn't want to do that, except probably will have to due to this bug since Firefox is unusable..

Btw, I have thousands of bookmarks. Ubuntu 12.10 running stock Unity and Firefox 16.0.2.

Attached is an image of how cpu usage is every time I switch windows after using the computer for a while.

Revision history for this message
Jesse Johnson (holocronweaver) wrote :

I have over a thousand bookmarks, though I am not sure exactly how many. I too am experiencing this problem and it is lowering productivity significantly since the slowdown is rather frequent and makes the browser temporarily inaccessible.

Is there a dev out there who can point me to where the code is that needs to be changed, perhaps with a hint or two on what to do? I am more than willing to fix the bug myself, but I am not familiar enough with the Unity code base to do so unaided in a reasonable amount of time.

Revision history for this message
kapetr (kapetr) wrote :

I can confirm in U12.04.

I have hundreds of bookmarks in FF 17.
If I use Alt+Tab to switch to FF (e.g. from term window) the FF freezes for cup of seconds.
Top shows great cpu usage by hud-service, FF and unity-panel-ser.

------------ >Leonardo Torok #10
that would be the best, I thing.

Revision history for this message
Night Train (nighttrain) wrote :

on ubuntu precise pangolin 12.04 lts 64 bit
kernel linux 3.2.0-35-generic
gnome 3.4.2
ram 4 GB
Intel® Core™2 CPU 6400 @ 2.13GHz × 2
graphics processor GeForce 9800 GT
nvidia driver version 304.64 (ppa x-swat)
indicator-appmenu 0.3.97-0ubuntu1.2 (precise-proposed)
unity 5.18.0-0ubuntu1 (precise-updates)
compiz 1:0.9.7.8+bzr3121-0ubuntu1 (precise-updates)
firefox 17.0.1+build1-0ubuntu0.12.04.1 (precise-updates)

combination of:
firefox
unity-panel-service
hud-service
cause temporary 100% cpu and occasionally the block of pc
(at times is sufficient ctrl+alt+f1, but in other moment not even this and the only way is power off!!!)

thanks

Revision history for this message
Night Train (nighttrain) wrote :

if i stop the process " hud-service" then all is ok and firefox to speed off like a bat out of hell!

thanks

tags: added: quantal
Revision history for this message
Jesse Johnson (holocronweaver) wrote :

The best temporary workaround is to disable the "Global Menu Bar Integration" addon. This seems to prevent Unity from scanning the bookmarks, resolving the problem.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 968533, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Revision history for this message
Henning Sprang (henning) wrote :

I have the same issue.

Why is this bug till open when it's a duplicate?

Revision history for this message
Oleksandr Shybystyi (o.shybystyi) wrote :

From time to time I am having hud loading cpu 100%.
I am using firefox and bookmarks a lot (CTRL+D).
So I have to kill the process (SIGKILL).

Firefox 37.0.2
Ubuntu 14.04

p.s. Don't know, but this does not seem like a duplicate of #968533

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.