UIEnhancer icon indicating copy to clipboard operation
UIEnhancer copied to clipboard

Location Bar Enhancer High CPU Usage

Open sgtbyrd opened this issue 11 years ago • 44 comments

As the title says, when the Location Bar Enhancer add-on is active it causes CPU usage to be at least 30x normal idle usage.

The extra usage depends on the address in the currently active tab's location bar. The more directories in the path, the worse the extra CPU usage. For example, "bbc.co.uk/news/england/london" causes ~100x idle usage. While pages with no location bar (such as about:addons) have no problem.


Testing:

All add-ons disabled: unable to reproduce issue, idle CPU usage is normal. Only Location Bar Enhancer enabled: issue always present.


Location Bar Enhancer Settings:

Breadcrumbs user interface: active Use new interface for the breadcrumbs: yes Show the page loading progress in the location bar: yes Show the status in the location bar: no


System:

Win 7 x64, Core i3 2120 @3.3ghz, 8GB RAM. Firefox version: 22.0 Location Bar Enhancer version: 5.1

sgtbyrd avatar Jun 28 '13 20:06 sgtbyrd

Can you give me a profile using the profiler add-on ?

grssam avatar Jun 28 '13 21:06 grssam

@scrapmac sure, can you give me a link to the profiler add-on you want me to use.

sgtbyrd avatar Jun 29 '13 07:06 sgtbyrd

https://addons.mozilla.org/en-us/firefox/addon/gecko-profiler/

grssam avatar Jun 29 '13 07:06 grssam

@scrapmac that add-on isn't available for Firefox v22

Screen

sgtbyrd avatar Jun 29 '13 09:06 sgtbyrd

You can directly try the addon from the repository : https://github.com/bgirard/Gecko-Profiler-Addon/raw/master/geckoprofiler_amo.xpi

grssam avatar Jun 29 '13 09:06 grssam

@scrapmac Ok, hoping I did this right. I enabled the Location Bar Enhancer add-on and reproduced the problem, I then clicked Analyse in the profiler add-on, then I saved that profile.

Here is that profile (zipped): http://www.mediafire.com/?9kdvnownim74skm

sgtbyrd avatar Jun 29 '13 10:06 sgtbyrd

Umm, instead of saving it to local, can you share it instead. This way, I have no way to put it back into the UI to have a look into it. But if you share, it will give you the link which you can give me here.

grssam avatar Jun 29 '13 10:06 grssam

@scrapmac here you go: http://people.mozilla.com/~bgirard/cleopatra/#report=b675eb7f12863034c80dbfdc01f431c2cad94664

sgtbyrd avatar Jun 29 '13 14:06 sgtbyrd

Are you sure that during the time of recording this profile, your CPU usage was 100% and that you have my ad-on enabled ? Because this profile is so smooth and normal. Only the paint events are taking up time and moreover, I can see Scriptish and SBP like add-ons in the stack too. Can you give me a profile in which :

  1. You have only my add-on enabled, and
  2. You can see high CPU usage.

grssam avatar Jun 29 '13 16:06 grssam

@scrapmac Allow me to clarify, my normal idle CPU usage for Firefox is ~0.1%. When the add-on is enabled and the current tab has a location bar, CPU usage stays constantly around 10%. Firefox never goes above 25%, I'm assuming because it sticks to one processor thread.

I don't have Scriptish, but I do have Greasemonkey. I don't know what you mean by SBP, but if you meant ABP, yes, I have Adblock Plus.

I did a profile where only two add-ons were enabled, Gecko Profiler and Location Bar Enhancer. The problem is still present.

When I try to take a profile now I get the following error: "Could not understand response from symbolication server at http://symbolapi.mozilla.org/"

So I'm not sure how easy to read this latest profile will be: http://people.mozilla.com/~bgirard/cleopatra/#report=857b96992e862b265dd894578f5f4a5ba87cf4a5

sgtbyrd avatar Jun 29 '13 16:06 sgtbyrd

I am sorry, but I cannot see why this profile will have high CPU because of my add-on. I am trying to find any function call from one of my scripts, but I could not find one. I am really sorry about your issue, but unless I am able to identify the main cause, I cannot be of any help.

grssam avatar Jun 29 '13 16:06 grssam

I did a little more testing and I think the problem is with the "new interface" for the breadcrumbs.

When I disable the option for "Use the new Interface for the Breadcrumbs", the problem is completely gone.

I've only noticed this problem in Firefox 22.0 as well. I've used this add-on for months with previous versions with absolutely no problems.

sgtbyrd avatar Jun 29 '13 17:06 sgtbyrd

Oh, that is very unfortunate that this happens only in Fx 22 onwards. Lets see if other people also face this issue. Maybe more reports will help narrow down the actual issue. Can you do one more thing please: Go to about:config page and search for uienhancer. All the uienhancer related configs will be shown, then send me a screenshot of that page.

grssam avatar Jun 29 '13 17:06 grssam

@scrapmac here you go

screen

sgtbyrd avatar Jun 29 '13 17:06 sgtbyrd

I'm having the same problem; when Location Bar Enhancer is active my FF22 uses 10-25% of the CPU, this problem arisen after updating Firefox or maybe after I installed the FT DeepDark theme (I don't know for sure).

well, after playing around with the options of the Location Bar Enhancer I found that Default styles (Default Light and Default Dark ) are the responsible of this high CPU usage (maybe they are buggy of have conflict with the FF22 or FT DeepDark theme I don't know).

for now I'm using the DevTools Light style with no problem; FF22 uses about 3% of the CPU on an old computer, but what I need is a Dark style to fit with my FF theme.

shobits1 avatar Jul 04 '13 08:07 shobits1

Its now even more confusing that @shobits1 is having no issues with Devtools Light theme while @sgtbyrd is having issues. @shobits1 do you also have the show status bar in location bar enabled ? Or in other words, can you also send me a similar screenshot of the about:config page like @sgtbyrd did ?

grssam avatar Jul 04 '13 08:07 grssam

no; I have show status bar in location bar disabled.

ff1

shobits1 avatar Jul 04 '13 09:07 shobits1

@scrapmac I didn't say Devtools light caused issues for me. I never even tried changing the style when the "new interface for breadcrumbs" is active. I just used the default one (Default Light I believe).

I have now tested the other styles. Default Light and Default Dark both cause the issue, Dannah's Light and Devtools Light both are fine, they never cause the issue.

sgtbyrd avatar Jul 04 '13 11:07 sgtbyrd

Thanks! Now at least its comforting that the new users will not be seeing this issue as the default theme is now "DevTools Light" since version 4.8 or something. I will still look into this using Firefox 22 and the two styles that you mentioned to see where the CPU is being used up.

grssam avatar Jul 04 '13 11:07 grssam

@scrapmac oh I discovered another fact of questionable usefulness.

If I have Firefox open in 2 windows at the same time, the problem is cured.

sgtbyrd avatar Jul 04 '13 12:07 sgtbyrd

Say Wut ? o.O

grssam avatar Jul 04 '13 12:07 grssam

@scrapmac If I open a new window (Ctrl+N), the problem goes away when the location bar in the second window displays breadcrumbs.

It confuses me as well.

sgtbyrd avatar Jul 04 '13 12:07 sgtbyrd

I got what you said the first time, but I was amazed to hear that :)

grssam avatar Jul 04 '13 12:07 grssam

@scrapmac I was amazed to discover it (accidentally). This bug is weird.

sgtbyrd avatar Jul 04 '13 12:07 sgtbyrd

Same problem here, also with both strange fixes. Any chance this could get fixed soon please? Default Dark is the only style that fits a dark FF theme and it's been a month now. I miss this add-on.

leaumar avatar Jul 31 '13 22:07 leaumar

I tried debugging it once using the dark theme and dark FF firefox theme, but no luck on the high cpu. Can you guys see if the high CPU issue exists on Firefox 23 also ?

Right now I am a bit overloaded with different projects. I will take out some time for completing the next update of this add-on maybe this weekend or the next.

grssam avatar Aug 01 '13 08:08 grssam

@scrapmac

When Firefox 23 enters release channel I'll try it. Currently my bandwidth is a little limited for downloading beta.

sgtbyrd avatar Aug 01 '13 09:08 sgtbyrd

Sure, that happens this Monday itself :)

grssam avatar Aug 01 '13 09:08 grssam

First off, sorry for the dozens of edits to this post... I like to report live :)

Second, I may have found something interesting... And weird.

I took the Default Dark code, turned the rgb() statements into hex colors, then ran the code through http://www.deancasalena.com/tools/csscompact/. The resulting code, when applied as a custom sheet, fixed the high CPU usage until the moment a new tab was opened. Opening the tab caused a sine-like wave of high and low CPU usage, then loading a page brought it up to its constant high level.

I have no idea what's going on but maybe you can see a clue in that?

leaumar avatar Aug 05 '13 22:08 leaumar

Found it!

In addition to my previous post (which I won't edit anymore now), I removed the background-size statements. That fixed the CPU usage, though now of course the arrows in the background of the bar are too large. Can't they be scaled to the right, fixed size as images instead of using CSS to scale them though? Or can the height of the URL bar vary?

leaumar avatar Aug 05 '13 23:08 leaumar