grssam / UIEnhancer

Source code for UI Enhancer addon
https://addons.mozilla.org/en-US/firefox/addon/ui-enhancer/
51 stars 22 forks source link

opening UI menus take large time on Reddit pages with this addon #85

Open mayankleoboy1 opened 11 years ago

mayankleoboy1 commented 11 years ago

STR :

  1. Create fresh profile
  2. Install addon from here : https://addons.mozilla.org/en-us/firefox/addon/ui-enhancer/
  3. Go to the URL.
  4. Right click on the titlebar --> customiz.
  5. The customize menu takes time to appear.
  6. Close the menu. The closing time is even larger.
grssam commented 11 years ago

Hi there, I cannot reproduce this. I have tried already.

What OS, and what hardware configuration are you using ?

Is the menu opening fast without the add-on ?

mayankleoboy1 commented 11 years ago

Win7, x64 . HWA enabled.
4GB RAM AMD HD5470M GPU with Catalyst 13.1 WHQL

Menus open fast without addon. With addon installed, there is about 1-2 second delay in opening the menu.
Then, closing that menu takes about 2-3 seconds. During this time, the complete UI is not responding.

You want a video/ gecko profile ?

grssam commented 11 years ago

yes, that would be very helpful :)

PS: make them separately, the profiler's video capture is very lagging.

mayankleoboy1 commented 11 years ago

It is easier to reproduce this on a bigger reddit page. http://ge.tt/1ETU3xa/v/0

It has the same reddit page, but with more comments. Try to repro from this.

grssam commented 11 years ago

So when I am using a safe mode, the context menu with the customize link opens in less than 250ms, the customize window opens in less than 500 ms. With only this add-on installed, no difference, with all my normal add-ons enabled, the customize context menu still opens in 250ms, but the customize window opens in less than 1 second now. Codewise also, I cannot see how this add-on will affect any of the browser UI except the location bar.

mayankleoboy1 commented 11 years ago

http://people.mozilla.com/~bgirard/cleopatra/#report=04b011085374c0e284604809f233356dd87084be

This is on a completely fresh profile. It shows opening and closing the customize menu.

grssam commented 11 years ago

Okay, I get it now, why you are seeing any impact at all. You see, when you go into the customize mode, I have to disable my add-on. So the impact will only happen when you choose customize and enter the customize mode. Reddit page has nothing to do with it, but if it is effecting, then that is some Firefox's internal issue. The impact should not be on any other menu element.

mayankleoboy1 commented 11 years ago

yeah. Only the customize window takes so much time. Maybe the page is doing some erronous reflow, and because reddit has so many nested comments, it takes a long time.....

So this is invalid from you ?

grssam commented 11 years ago

Well, slowness on reddit is invalid, a very minor impact will happen while opening and closing the customize menu, but that should be consistent across all web pages, more or less.

mayankleoboy1 commented 11 years ago

now that you say, i do notice a minor impact on opening customize menu on all pages. That is OK, i think. I am more concerned about large delay on reddit, which grows with the size of the page. Maybe file a bug, and cc some people ?

grssam commented 11 years ago

Without this add-on, do you see a difference in opening up of the customize window on reddit as compared to other pages ?

On my computer, I hardly see any difference with this add-on, forget without.

mayankleoboy1 commented 11 years ago

Without this addon, customize menu on both reddit page and a new tab open same. With this addon, the reddit page takes much longer than a new tab.

The delay is extremely visible specially during closing the customize menu. Because when customize menu is open, the title bar expands (and tabs are shifted down) . When you click the close button of the menu, the expanded title bar remains visible for about 1-2 seconds. Which visually indicates that the UI is 'hanging'.

grssam commented 11 years ago

Let me dig into this a little more then.

mayankleoboy1 commented 11 years ago

Any updates ?

grssam commented 11 years ago

Hey, i just sped up a few things in the code. Can you test now again please ?

mayankleoboy1 commented 11 years ago

Great! Where do i get the new version ? i have V5.1 with me.

grssam commented 11 years ago

You can use the latest code, pack the files into an zip file and rename that file to a .xpi file to install it .

mayankleoboy1 commented 11 years ago

I downloaded the repository through this link : https://github.com/scrapmac/UIEnhancer/archive/master.zip And renamed it to .xpi . It did not install.

other than this, i dont know which code to download.

grssam commented 11 years ago

That code is one level nested, you would have to move things up one level in that zip. Anyways , here is the xpi : https://dl.dropboxusercontent.com/u/3250186/UI%20Enhancer.xpi

mayankleoboy1 commented 11 years ago

With V5.1 , the slowness is lesser now, than it was three months ago.

The version posted above feels the same as V5.1 in this issue. There is still a ~1 second delay when you close the "customization menu". But as i said, it is better than it was three months ago.

mayankleoboy1 commented 11 years ago

However,i noticed that in the new version, on a blank new tab(or any other page), if you open the customization menu, and then close it, the addon does some heavy-ish CPU processing. It uses 1 core fully for about 2 seconds. Is this by design ?

grssam commented 11 years ago

Man, I can't tell it feels almost instantaneously for me :(

grssam commented 11 years ago

can you again give me a profile (on new tab page this time) ?

mayankleoboy1 commented 11 years ago

Hmm, i cant reproduce on a fresh profile. So disregard the earlier comment.

grssam commented 11 years ago

The link I posted earlier was actually a dropbox cached version 4.7 and not 5.2pre... Please use this link https://dl.dropboxusercontent.com/u/3250186/UI%20Enhancer%205.2b.xpi and try again.