Closed
Bug 1385618
Opened 7 years ago
Closed 7 years ago
Turn Off the Lights does extremely expensive work from its storage callbacks
Categories
(WebExtensions :: General, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: stefan.vd01, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36
Steps to reproduce:
1. Install the Turn Off the Lights Firefox extension on a new clean Firefox profile from this official website:
https://addons.mozilla.org/en-US/firefox/addon/turn-off-the-lights/
or https://www.turnoffthelights.com/firefox.html
2. Leave the both tabs open.
3. When you open then the Turn Off the Lights Options page (from file -> add-on menu)
3. Enable the "autostop" feature (or any other features such as Night Mode)
Actual results:
You see the all tabs is refreshing and then freeze the Firefox web browser
Expected results:
No freezing.
note:
This is a webextensions port from the Turn Off the Lights Chrome extension.
And both Google Chrome, Opera doesn't have this issue.
Here in Firefox it is a performance issue for our users.
note: I am the developer of the Turn Off the Lights Browser extension
Updated•7 years ago
|
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Comment 2•7 years ago
|
||
Can you give us some details about what the autostop feature does?
Component: WebExtensions: General → WebExtensions: Compatibility
Example you click on the "autostop" checkbox (in the Turn Off the Lights -> Basics tab)
That "autostop" feature, is to stop those automatically playing HTML5 videos. Such as on YouTube.
Comment 5•7 years ago
|
||
I don't think its autostop but the saving of the settings to storage.sync. On Windows this causes a large increase in CPU usage. Could one of you investigate, it sounds like something we should prioritise. I was able to reproduce this problem without being logged into FxA.
Flags: needinfo?(lgreco)
Flags: needinfo?(kmaglione+bmo)
Updated•7 years ago
|
Summary: When change a setting in the Turn Off the Lights Firefox extension the Firefox web browser is almost freezing → CPU usage spike from browser.storage
Comment 6•7 years ago
|
||
STR:
* create a new profile
* install turn off the lights
* go to options page
* click a couple of buttons
* watch CPU spike
At this point I haven't logged in through FxA or connected up storage.sync.
Here's my attempt at doing this and getting some Gecko profiles:
https://perfht.ml/2vYsD8X
https://perfht.ml/2vYAB1J
It seems to be better for me in todays Nightly.
Comment 7•7 years ago
|
||
It looks like they're trying to animate their icon, calling setIcon *a lot* of times, very rapidly.
Flags: needinfo?(kmaglione+bmo)
@Kris
No, we do not animate the icon. It is a flat icon. However, for each click on the tab we refresh the lamp icon.
Comment 9•7 years ago
|
||
Sorry, you're right, the animate() function in the profile confused me.
Either way, it comes to the same thing. Every time you change any of your options, your storage observer queries the entire list of tabs, and then individually changes the icon for each of them, which is what's causing the problem.
Updated•7 years ago
|
Summary: CPU usage spike from browser.storage → Turn Off the Lights does extremely expensive work from its storage callbacks
Updated•7 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Flags: needinfo?(lgreco)
Updated•7 years ago
|
Component: WebExtensions: Compatibility → Add-ons
Product: Toolkit → Tech Evangelism
Version: 54 Branch → Firefox 54
Comment 10•7 years ago
|
||
Mass-closing bugs that relate to legacy versions of add-ons or are otherwise no longer worth tracking. Please comment if you think this bug should be reopened.
Sorry for the bugspam. Made you look, though!
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•6 years ago
|
Component: Add-ons → General
Product: Tech Evangelism → WebExtensions
Updated•5 years ago
|
Version: Firefox 54 → 54 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•