grssam / User-Style-Manager

Source Code for the addon User Style Manager
https://addons.mozilla.org/en-US/firefox/addon/user-style-manager/
28 stars 4 forks source link

Startup Improvement #104

Open alopepeo opened 11 years ago

alopepeo commented 11 years ago

Technical Details:

CPU: Intel Core 2 Duo RAM: 3GB O.S.: Windows 7 Ultimate x86

Tested on a clean Firefox instalation for USM and for Stylish.

  1. Install Tabs Always in Titlebar. This is needed for the style below.
  2. Install this style created by me: App button and tabs. Try to do it under USM and with Stylish (but not at the same time) and after that restart Firefox. The purpose of this style is hide the Firefox app button, but you can access it clicking on the favicon of the first tab. It also reduces tabs width.

You'll see that under USM, the style takes a bit to load, but with Stylish it loads intantly and you don't realize that process.

This time is longer when it's the first time you turned on the computer, and therefore, the first time that Firefox startups.

Would be great if you can remove that time, or improve it with any of your magic ways to do things ;)

Thanks!

grssam commented 11 years ago

On my system, the delay is not noticable. But you might see the delay depending upon the order of USM vs Stylish in the add-ons. Like on startup all addons are started one by one, so the order will determine when an addon starts.

alopepeo commented 11 years ago

I test them under separated profiles. In one profile was the Tabs Always in Titlebar addon with USM. And in the other profle the same, but with Stylish intead of USM. In the USM profile, the addon is second, while in the Stylish profile, it's first. So, I try to change the name to "AAA" and locate it at first, but results were the same. Did you try restarting Firefox instantly when it starts? (something like an exhaustive restart, start Firefox and restart it instantly). You can do it more fast if you've the Restartless Restart addon. Else, try to shutdown your computer and start Firefox immediately after you logon. I also think that, as Stylish stores its styles in a single .sqlite file, that gives it a more faster reading and writing performance. I don't know what more say.... If you can't see it with your own eyes, I've taken a screenshot: http://www.dropmocks.com/iBltEv. Would be really great that you can do something with this, because it results annoying most times, but, if you can't do anything, close this issue if you want.

I don't mind the priority of this issue, I know you have work to do.

grssam commented 11 years ago

Can you do one quick check ?

Add a style block in that style sheet which changes the color of the tabs text and then perform the same test again ? I need to see something that I am suspicious of. Thanks.

alopepeo commented 11 years ago

Ok, here you have the screenshots:

There are 2 tabs opened in both profiles: the Firefox Home Page and the User Style Manager issues.

USM:

  1. Too early startup, you'll se that also the Restartless Restart button located at the top-right corner in the nav-bar isn't loaded yet: http://www.dropmocks.com/iBl2UF.
  2. A little after screenshot: http://www.dropmocks.com/iBl10_

Stylish (the same conditions than USM):

  1. http://www.dropmocks.com/iBl2UE
  2. http://www.dropmocks.com/iBl2jy

Note: I've modified the style also in the Usestyles.org page.

Under Stylish, the style (and the tabs color) loads even when the Restartless Restart buttons isn't still visible. Take your own colcusions.

grssam commented 11 years ago

So then its basically a restartless add-on trade-off. Firefox must be lazy loading it, atleast later than the restart required add-ons. Moreover, did the style even load ? Even after Restartless restart loaded ...

alopepeo commented 11 years ago

Ok, that's really sad :( Conclusion: It's something that Mozilla should do, like a "preload" of Restartless addons to match with the load time of non-restartless addons. So, do you want to close this issue? I'll see some other ways to improve the load of this addon, or change the way that my style modifies the Firefox interface. I'll notify you later if I found something.

Really thanks for trying it!

alopepeo commented 11 years ago

I was thinking that not all restartless addons take this time to start, so I tried to apply this style through other restartless addon. I used the source code from "Cleanest Addon Manager" from version 4 (the lastest is 6, but it integrates options and I want something more simple). In the cam.css file, I replace the original code with the code from my style. Restarting Firefox many times, the style is applied perfectly, like in Stylish.

Here you have the addon if you want to test it: http://goo.gl/KCMfK

That let me think that USM takes some time on load because it's more complex, or because there are some things that make it slower. I don't know.

grssam commented 11 years ago

For me, both the modified addon that you have pasted link to, and my USM using the style take up the same time. I wonder if you are seeing a delay because you have many styles applied ?

alopepeo commented 11 years ago

No, in the test that I show you comparing Stylish with USM, there is only my own style under a clean Firefox profile. You have to see it with your own eyes in a more slow computer. My computer is now too slow to do this process, but is sufficient to see the delay. I'll also test this on a more new machine.

grssam commented 11 years ago

heh, I am not saying that it is not slow in your case. I will look into it as soon as I finish off Sync and AOM integration.

alopepeo commented 11 years ago

I'm saying that your computer may be a core i3, i5 or i7 and like they can do more process at the same time and it's a more new technology, that is causing you don't see the delay, I think.

Don't worry. I know you have more important things to do.