New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uBlock modifies the file com.apple.Safari.Extensions.plist every few minutes #56
Comments
I disabled all filter lists but it still happens |
I think Safari triggers the rewrite. Try disabling uBlock and just let Safari sit there and do nothing with it. Now start Terminal and write something like:
You'll notice the file gets rewritten every 3 to 4 minutes. No matter what. It especially gets nasty when you had or still have Best is to open the I've been there too just recently. 😁 |
@the-real-tokai Wow, thanks a lot for the detailed comment! I have to say, I was looking for something like this without any hope of finding it. Yes, the file does get continuously rewritten. It’s a big problem for me. I actually don’t (and didn’t) use Adblock, just uBlock – however, my file is nearly 40 MB large! It’s not just a few hundred kilobytes. That means that I’ve actually been trying to find out what’s behind this However, I did try what you suggested – to disable uBlock and to not use Safari – and it looks like the file isn’t being written to anymore, after running the command for about ten minutes. Then I tried using Safari with it disabled, and still no activity. Then I enabled uBlock and left Safari in the background, and started to open and rename it. So it seems like the problem for me really is with uBlock. What can I do? I’m not disabling uBlock, but there has to be a way to reduce the size of the file to save my poor disk. I'll try your suggestion with opening the plist and see if there is anything I can get rid of (most likely some large filter lists). |
Okay, so I quickly disabled easylist, as well as some other lists (which added up to around 100,000 filters), but the file size remained the same. I'm not sure whether these are stored in the plist's "cache." I probably could figure it out by diffing these files, but as you can tell, diffing these files is not an easy task! Oh, by the way, I had to exclude |
Did you load up the file in Xcode to see what's inside exactly? There might be a lot of old ballast inside (from extensions you had installed previously). I don't think old stuff gets wiped automatically here (I'm not entirely sure how Safari handles this) Or try this command to get a quick overview via Terminal:
What does that print for you? BTW, uBlock's lists are stored in a different place: |
I checked my I'm not really sure how I might further troubleshoot this, but I hope my observation helps any of you get closer to figuring out what's causing the constant re-writes and/or how to resolve it! |
uBO will save to its settings the block/allow counts (the "since install" stats) when all conditions below are met:
|
@gorhill Thanks! That would explain why this file keeps being rewritten. |
@the-real-tokai Nice command! I ran it, and this is what it shows:
And that's the only thing is shows, which confirms my suspicion that only uBlock is causing this. Why it's not so for all of you is a question I have. I tried opening it with Sublime Text instead of Xcode (it's much faster). It seems like I have filter lists in this file. There are a lot of sites listed. However, my lists are indeed stored in that folder you mentioned, so I can't figure out why they're in my |
@sn0wyfall I would create a back-up of the plist file, after that go to uBlock's settings and use 'Backup to file', then quit Safari, use the defaults command (see below) to wipe the settings file (plist), restart Safari, go to uBlock's settings page and use 'Restore from file'. In theory this should wipe old stuff without loosing all of uBlock's current settings.
Just in case also make a few screenshots of all of uBlock's settings pages, then you can compare/ verify later. |
@gorhill Maybe this duration should be configurable and the whole feature also disable-able? Personally I don't care much about some 'since the beginning of time' stats, for example, so all this saving could be omitted in my case. 😄 |
@the-real-tokai Whew, thanks for the quick reply! I can try this out right now. Seems like a pretty smart way to go about doing it. |
@the-real-tokai Awesome, nice! It worked! Now it's only 100 KB, which is great. The only problem is that I see is that my stats were reset (which I actually do care about), but that's not a huge deal. I had around 200,000, almost like you. Editing the figure in the file doesn't change uBlock's figure, so it's probably going to be overwritten by uBlock, so that won't work. I do support your idea for the duration to be changeable, or at least made to 60 minutes – I think that would be fine for most use case scenarios |
@sn0wyfall Glad it worked out! 😃 When you edit the plist file manually you have to kill the But then... |
Yeah, right, better lose some stats instead of losing my disk! I'll monitor the usage and see if this has finally fixed it (I can't tell yet) |
Describe the issue
Because of uBlock, my
com.apple.Safari.Extensions.plist
file, located in/Users/sn0wyfall/Library/Preferences/com.apple.Safari.Extensions.plist
, is nearly 40 MB big. This is fine, but there is a big problem: for some reason, uBlock seems to like modifying this file every couple of minutes. A lot of the time literally nothing seems to change in the file. I tried diffing two versions, and it seemed as though nothing changed.Now normally this wouldn't be a big issue, but Time Machine views these as different files. It backs them up and this has added nearly a gigabyte to my backup over the past few days.
Would it be possible to prevent the file from being updated so often?
I tried looking at whether any of my lists were being updated, but it looked like they weren't. It seems as though this isn't related to which lists I have active.
This issue goes away when I disable uBlock.
If you want to check whether this happens to you, go to:
and then check the last modified date. Does it reflect the time a few minutes ago?
Your settings
Your filter lists
Will update in a bit
Your custom filters (if any)
The text was updated successfully, but these errors were encountered: