Closed
Bug 1078603
Opened 10 years ago
Closed 6 years ago
plusone.js in background tabs consumes too much CPU time
Categories
(Web Compatibility :: Site Reports, defect, P3)
Web Compatibility
Site Reports
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: kmag, Unassigned)
References
()
Details
(Keywords: perf, Whiteboard: [needsdiagnosis])
I've run into this on multiple computers. I'll notice that Firefox is using a lot of CPU time, run the Gecko Profiler, find out that plusone.js timer callbacks are almost entirely responsible, block that script in ABP, and have CPU usage return to sane levels.
I don't know whether this is something we should fix ourselves, by throttling those callbacks, or which we should try to get Google to fix, but it's a serious problem for me, so it probably affects others as well.
Comment 1•10 years ago
|
||
Hi Kris,
Thanks for the report.
* Could you give us a URI where you noticed the issue?
* Does it happen on other browsers?
* Which version of Firefox did you use?
* Which User Agent String for the browser?
Thanks.
Flags: needinfo?(kmaglione+bmo)
Comment 2•10 years ago
|
||
Kris, do you have a URL?
I've seen this with google search, I think for at least a couple months. Randomly I get "Unresponsive Script". I use current nightly. I've never seen the cpu issue in another browser but I probably do not use others enough to encounter it.
Application Basics
------------------
Name: Firefox
Version: 36.0a1
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:36.0) Gecko/20100101 Firefox/36.0
Multiprocess Windows: 0/3
Extensions
----------
Name: About sessionstore
Version: 0.3
Enabled: true
ID: aboutsessionstore@dt
Name: about:addons-memory
Version: 8
Enabled: true
ID: about-addons-memory@tn123.org
Name: CopyAllUrls
Version: 0.9.2
Enabled: true
ID: {960BE052-4847-422b-9AD6-8631D3D0A607}
Name: Flashblock
Version: 1.5.17
Enabled: true
ID: {3d7eb24f-2740-49df-8937-200b1cc08f8a}
Name: Nightly Tester Tools
Version: 3.7
Enabled: true
ID: {8620c15f-30dc-4dba-a131-7c5d20cf4a29}
Name: Restartless Restart
Version: 9
Enabled: true
ID: restartless.restart@erikvold.com
Name: Session Manager
Version: 0.8.1.7pre20141016b
Enabled: true
ID: {1280606b-2510-4fe0-97ef-9b5a22eafe30}
Name: Snap Links Plus
Version: 2.4.0
Enabled: true
ID: snaplinks@snaplinks.mozdev.org
Name: Tabhunter
Version: 1.0.5
Enabled: true
ID: tabhunter@ericpromislow.com
Name: Theme Font & Size Changer
Version: 32.3
Enabled: true
ID: {f69e22c7-bc50-414a-9269-0f5c344cd94c}
Name: TinyURL Generator
Version: 2.6.1
Enabled: true
ID: tinyurl.addon@fast-chat.co.uk
Name: Tree Style Tab
Version: 0.14.2014102100a214156
Enabled: true
ID: treestyletab@piro.sakura.ne.jp
Keywords: perf
Reporter | ||
Comment 3•10 years ago
|
||
Sorry, I haven't been able to get specific URLs yet. I've seen this happen on multiple computers. I generally have a fairly large number of tabs open, and this seems to be the combined result of Google Plus widgets on a number of unrelated sites.
Blocking that script in ABP solves the problem, so this hasn't come up in my daily usage recently, and I therefore haven't had any profiler data to dig into.
Flags: needinfo?(kmaglione+bmo)
Comment 4•10 years ago
|
||
I get the plusone.js activity on this page:
http://www.healthyfoodhouse.com/traditional-amish-remedy-that-cures-many-diseases-including-cancer/
I noticed it while trying to track down a user memory problem in bug 1122529. Not sure if its related to the memory leak, though.
See Also: → 1122529
Comment 5•10 years ago
|
||
Profile showing the plusone.js activity:
http://people.mozilla.org/~bgirard/cleopatra/#report=e33f4ad5a1877e0b94de92c35a3919adb3405781
Comment 6•9 years ago
|
||
I've also just determined I'm encountering this problem. Interesting to note as clearly the root issue, be it in Google's JS or the Firefox codebase (or both), is still present. It manifests for me in that Firefox will become progressively slower over a matter of days. If I start it on Monday, by Friday there'll be a very noticeable amount of lag, loading pages takes much longer, even keystrokes will often lag on input.
The Gecko profiler shows the activity is overwhelmingly due to plusone.js with a smaller amount in JS GC (which may be related). The issue at its worst seems to effectively consume a CPU core, which is also hell for battery consumption on laptops.
I'm uncertain which specific tab(s) are responsible as many likely source in the problematic JS.
Here's an uploaded sample trace:
https://cleopatra.io/#report=aa4d28c163356b1fe48722766a8c4308b858bc24
Current configuration is Firefox 45.0.2 64-bit build on Windows 10 x64.
Comment 7•8 years ago
|
||
On the example page which has been given in this bug.
http://www.healthyfoodhouse.com/traditional-amish-remedy-that-cures-many-diseases-including-cancer/
```html
<div style="text-indent: 0px; margin: 0px; padding: 0px;
background: transparent none repeat scroll 0% 0%;
border-style: none;
float: none;
line-height: normal; font-size: 1px;
vertical-align: baseline; display: inline-block;
width: 50px; height: 60px;"
id="___plusone_0">
<iframe hspace="0" marginheight="0" marginwidth="0" scrolling="no"
style="position: static;
top: 0px;
width: 50px;
margin: 0px;
border-style: none;
left: 0px;
visibility: visible;
height: 60px;"
tabindex="0" vspace="0"
id="I0_1472624272685"
name="I0_1472624272685"
src="https://apis.google.com/se/0/_/+1/fastbutton?usegapi=1&size=tall&count=true&origin=http%3A%2F%2Fwww.healthyfoodhouse.com&url=http%3A%2F%2Fwww.healthyfoodhouse.com%2Ftraditional-amish-remedy-that-cures-many-diseases-including-cancer%2F&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.ja.ozoqwo9IU_E.O%2Fm%3D__features__%2Fam%3DEQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCPYM7xjpUxkzDD3iDGb5Y5mFr6KNw#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh&id=I0_1472624272685&parent=http%3A%2F%2Fwww.healthyfoodhouse.com&pfname=&rpctoken=11306799"
data-gapiattached="true"
title="+1"
width="100%"
frameborder="0">
</iframe>
</div>
```
Switching to needsdiagnosis so we really have a precise idea of what is happening and where the CPU issue is happening (IF it is still happening, I don't have any impact on Firefox Nightly 51)
Whiteboard: [needsdiagnosis]
Comment 8•8 years ago
|
||
plusone.js confirmed as spiking cpu usage on page/tabs left open over several days.
it is used on manga reading pages such as http://mangafox.me/manga/19_days/c176/1.html.
Updated•7 years ago
|
Priority: -- → P3
Comment 9•6 years ago
|
||
Not sure this one is still reproducible.
Whiteboard: [needsdiagnosis] → [needsdiagnosis][qf]
Comment 10•6 years ago
|
||
Kris, have you seen this recently? This is really old bug and I haven't seen duplicates at least not recently.
If no one has seen this recently, we should just close this.
Flags: needinfo?(kmaglione+bmo)
Whiteboard: [needsdiagnosis][qf] → [needsdiagnosis]
Reporter | ||
Comment 11•6 years ago
|
||
I haven't seen it in a while, but my current computer also has an offensive number of cores, so I tend not to notice these issues as much.
I'll close for now and reopen if I see it again.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(kmaglione+bmo)
Resolution: --- → WORKSFORME
Assignee | ||
Updated•6 years ago
|
Product: Tech Evangelism → Web Compatibility
You need to log in
before you can comment on or make changes to this bug.
Description
•