Opened on 09/26/2016 at 06:19:26 AM

Closed on 07/09/2019 at 07:09:27 PM

#4470 closed defect (rejected)

ABP Causing VERY high CPU usage in Safari 10 (Sierra)

Reported by: MysticalOS Assignee:
Priority: Unknown Milestone:
Module: Platform Keywords:
Cc: kzar, sebastian Blocked By:
Blocking: Platform: Safari
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)

Environment

macOS 10.12 (Sierra). Safari Version 10.0 (12602.1.50.0.10)
Adblock Plus 1.12.3 and 1.12.1 with all filters and subscriptions disabled

How to reproduce

  1. Browse to https://www.warcraftlogs.com/reports/WcN3azGV8bYZnpC1#type=summary&view=events&fight=10
  2. Perform actions such as scrolling and clicking on the drop down menus.

Observed behaviour

  • Adblock Plus / Safari uses extremely high CPU.
  • The page is laggy and unresponsive, for example there is a delay drop down menus open.

Expected behaviour

More or less the same CPU usage and responsiveness as when Adblock Plus isn't installed.

Attachments (0)

Change History (14)

comment:1 Changed on 09/26/2016 at 06:20:18 AM by MysticalOS

Additional, Tested and reproduced issue with experimental "safari content blocking" enabled and disabled. No difference in behavior.

comment:2 Changed on 09/26/2016 at 11:29:37 AM by mapx

  • Cc kzar sebastian added

comment:3 Changed on 09/26/2016 at 03:22:45 PM by kzar

  • Cc rraceanu added

Mind trying to reproduce this Robert? Particularly interested if there's a difference between Safari 9 and 10. Did Adblock Plus' CPU usage get worse with Safari 10?

comment:4 Changed on 09/26/2016 at 03:39:07 PM by kzar

  • Component changed from Unknown to Platform

comment:5 Changed on 09/26/2016 at 06:53:58 PM by MysticalOS

Just want to add, on most sites, there is negligible cpu increase. Not using a slouch of a computer either. A high end hackitosh with a 4790k overclocked to 4.6ghz. a 980ti with a 35% overclock and metal renderer for window server. But this bug, makes it so this system can't even scroll the page without cpu deadlocking. Spin dumps showing it's locking up from extension/javascript. I'm currently uploading a video demo of page used for more clarity as well as a cpu monitor to show just how harsh it locks cpu. As well as how unscrollable page is with ABP on and how smooth it is when it's off. I have found only two sites so far that struggle like this. Facebook and amazon.com. Both sites have same issue and the common theme in both sites it seems is side bars top bars bottom bars MANY BARS. Basically a lot of multi block/frame code + scrolling brings ABP to it's knees. Any other site is smooth as butter with ABP.

Here is Demo Video:
https://www.youtube.com/watch?v=TkbmL30s1CI

If spin dumps will help I can reproduce it and rum some samples to show what cpu is hung up on but I figure if You can reproduce it internally you'll be able to do same. Video should give you a good indication what kind of page to test on. Also you'll note other extensions in video but I did run same tests with ONLY ABP as well and found the other extensions were inactive or had no performance/compatibility impacts

Last edited on 09/26/2016 at 06:54:37 PM by MysticalOS

comment:6 Changed on 10/05/2016 at 03:47:01 PM by kzar

  • Cc rraceanu removed
  • Description modified (diff)

Sorry for the delay with this. I've had no luck reproducing this so far, I can't see much difference in CPU usage or responsiveness when Adblock Plus is installed.

  • From your video it looks like you have some other Safari extensions installed, BackTrack and Tampermonkey. Does the problem still occur when you disable those? (Do you have any Tampermonkey scripts installed that could be running on Facebook?)
  • The group used for your demonstration was "Savannah Area Pokemon GO" but that appears to be a closed group so I can't easily test that. Do you have a different example page that triggers the problem but that's public?
  • You mention that the problem occurs when you only have the EasyList subscription enabled. Could you test to see if the problem still occurs if you disabled EasyList and Acceptable Ads? (Curious to see if it still happens when there are no filters at all.)

comment:7 Changed on 10/05/2016 at 06:15:40 PM by MysticalOS

it does occur with only ABP enabled

It was happening on amazon.com as well but whatever ad/element that was causing it seems gone now as I can no longer reproduce there. It was also happening at warcraftlogs.com . Try this link https://www.warcraftlogs.com/reports/WcN3azGV8bYZnpC1#type=summary&view=events&fight=10 then do things like scroll, or click drop down menus. Drop down menus especially will lag and not open right away and spike cpu with ABP

It'll also happen on facebook wall too.

It happens with ALL filter lists disabled.

Only thing that makes it never happen ANYWHERE is having ALL extensions disabled. Upon further testing I found other extensions can trigger it too but not as often as ABP. I now believe it's safari/extensions itself that causes bug and no single extension is to blame but instead something they use. Something that ABP seems to use a lot more than the other extensions so disabling only it resolves it in like 99% of cases. At this point I may open a radar with apple/webkit for them to do some testing too. But if you find what api causes it at all it'd be good for you to report it too.

comment:8 Changed on 10/05/2016 at 07:58:56 PM by kzar

So to double check you've seen this performance problem on that warcraftlogs.com page, when Adblock Plus is the only extension installed and EasyList + Acceptable Ads are disabled? I'm going to have another try at reproducing this tomorrow, thanks for the help.

comment:9 Changed on 10/05/2016 at 08:04:52 PM by kzar

  • Description modified (diff)

comment:10 Changed on 10/06/2016 at 05:23:20 AM by kzar

Upon further testing I found other extensions can trigger it too but not as often as ABP.

So when an extension didn't yet trigger the bug how did you cause the bug to start happening? By refreshing the page, or by restarting Safari, or by uninstalling & installing the extension, or in some other way?

comment:11 Changed on 10/06/2016 at 05:29:56 AM by kzar

I am still not able to reproduce this problem, but I will leave the issue open for now since I'd like to get to the bottom of this.

comment:12 Changed on 10/06/2016 at 05:31:26 AM by MysticalOS

generally it's not always 100% it'll trigger with ABP enabled. but when it does it pretty much does not go away even reloading page until it's disabled. once disabled it 100% NEVER happens. i can re-enable and it may not occur right away but once it starts it tends to stick until again disabled. So whatever triggers it it persists until disabled. But it may not always trigger. it's always same webpages that trigger it though.

One thing that was odd is when it's triggered, if I set "disable for this webpage" it doesn't make it go away. Not until I literally disable ABP

However, once "disable for this webpage" is checked, it will never RE-trigger on that website again, unless i re-enable for that website.

I'm going to cpu profile and spin dump it and open a radar with apple on it and see if they can see what is going on from spin dump.

Last edited on 10/06/2016 at 05:32:41 AM by MysticalOS

comment:13 Changed on 10/06/2016 at 05:52:40 AM by kzar

I'm still not able to reproduce this, but there is something you could do to give us a clue what's happening.

Could you open the Safari Web Inspector, select the "Timelines" tab, select "JavaScript & Events", click the Red circle at the top left and then do whatever causes the problem for 30 seconds? Then click the black square to stop recording.

If you click "Events" next to "Details" at the bottom left and select "Call Trees" you should be able see which code is using the most CPU. Sort by "Total Time" descending, then partially expand the first few entries and take a screenshot.

(Depending on your screen size you might need to click the "Detach into separate window" button in the top left of the inspector. I found I could barely see the "Details" section otherwise.)

comment:14 Changed on 07/09/2019 at 07:09:27 PM by sebastian

  • Resolution set to rejected
  • Status changed from new to closed

I'm closing all issues related to the legacy Safari extension, as it has been discontinued in favor of an App Extension that doesn't share any code with the old extension.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.