Opened on 01/20/2018 at 08:21:48 PM

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

Last modified on 10/08/2019 at 06:04:02 PM

#6295 closed defect (rejected)

Adblock Plus for Safari is causing large amount of disk writes

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

Description (last modified by kzar)

Environment

Mac OS X El Capitan 10.11.6, Safari 11.0.2, Adblock Plus 1.12.4

How to reproduce

  1. Open the macOS Task Manager, look for the "cfprefsd" task / process.
  2. Open Safari and browse to https://youtube.com
  3. Navigate to a few different videos

Observed behaviour

"cfprefsd" is performing large amounts of writes, several gigabytes in 30 minutes of browsing YouTube.

Expected behaviour

Less disk writing when using Adblock Plus with Safari.

Notes

  • The large writes only seem to happen when browsing websites with blocked ads.
  • It seems like the whole "com.apple.Safari.Extensions.plist" file (in ~/Library/Preferences/ is being written each time.
  • This could be a repeat of #6050, but this time for Safari. Perhaps if we backport the workaround that delayed updating the hit counter preference so often it would help.

Attachments (0)

Change History (8)

comment:1 Changed on 02/13/2018 at 09:40:12 AM by sergz

  • Cc sebastian kzar sergz added

comment:2 Changed on 02/13/2018 at 12:11:41 PM by kzar

  • Cc mani666 added
  • Component changed from Unknown to Platform
  • Description modified (diff)

Thanks for filing the issue, please could you confirm the macOS, Safari and Adblock Plus versions you're running? Also which filter subscriptions you have and which custom filters (if any). We can then attempt to reproduce and triage this for you.

Also you mentioned finding other users online with the same problem. If possible could you link those discussions so I can add them to the issue for some extra context.

Sounds like a repeat of #6050, but this time for Safari. Perhaps if we backport the workaround that delayed updating the hit counter preference so often it would help.

comment:3 Changed on 02/13/2018 at 12:12:54 PM by kzar

  • Description modified (diff)

please could you confirm the macOS, Safari and Adblock Plus versions you're running

My bad, you already did at the bottom. Sorry I missed that.

comment:4 Changed on 02/13/2018 at 12:33:47 PM by kzar

  • Description modified (diff)
  • Summary changed from Task cfprefsd massive writes to disk using Safari to Adblock Plus for Safari is causing large amount of disk writes

comment:5 Changed on 05/18/2018 at 08:40:56 PM by user23948

I've noticed the same problem. Steps I took to verify:

  • In Safari's Extensions preferences, disable all extensions except Adblock Plus
  • Open a Safari window and navigate to https://www.nytimes.com/
  • Open Activity Monitor, select the tab “Disk”, and use the search field to search for “cfprefsd” (see: https://support.apple.com/en-us/HT201464#disk)
  • In Safari, reload the browser window a few times, and in Activity Monitor, observe the “bytes written” for “cfprefsd” (wait for it to stop increasing after each reload)

Here's the evolution of “bytes written”, in my case, after each page reload: 1.06GB; 1.18GB; 1.28GB; 1.37GB; 1.44GB.

  • Next, in Safari's Extensions preferences, also disable Adblock Plus
  • Again, reload the browser window a few times and observe Activity Monitor

In my case, “bytes written” by “cfprefsd” stayed at 1.44GB.

So, AdBlock Plus seems to be what's causing “cfprefsd” to write around 0.1GB each time the page is reloaded.

I also suspect that this is, as mentioned in the “Notes” above, because Adblock Plus is causing multiple rewrites of the file “com.apple.Safari.Extensions.plist” (located in ~/Library/Preferences). In my case, this file is around 33MB. Some extensions seem to be storing several MBs of data in this file, including Adblock Plus: if I make a copy of the file and edit it (in Xcode) by removing the root entries except for the “org.adblockplus” one, the new file is still 16MB.

Version information: macOS 10.13.4, Safari 11.1, Adblock Plus 1.12.4.

comment:6 Changed on 05/21/2018 at 09:51:40 AM by kzar

  • Priority changed from Unknown to P3
  • Ready set

comment:7 Changed on 07/02/2019 at 11:44:19 AM by takken3

spam

Last edited on 10/08/2019 at 06:04:02 PM by kzar

comment:8 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.