Skip to content
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

request: some unused resources are spuriously updated #2594

Closed
joey04 opened this issue May 8, 2017 · 16 comments
Closed

request: some unused resources are spuriously updated #2594

joey04 opened this issue May 8, 2017 · 16 comments

Comments

@joey04
Copy link

joey04 commented May 8, 2017

I only use the Fanboy Ultimate list, so ideally any list updating would only fetch that list along with assets.json

But starting from a clean browser cache, here's what I see in about:cache after forcing an update.

Pale Moon 27.3

pale moon cache after all lists forced update

Firefox 53

firefox cache after all lists forced update

It would be nice not to fetch resources.txt, as I don't use those (ignoreRedirectFilters = true and ignoreScriptInjectFilters = true). And why is Firefox also retrieving AdBlockProtectorList? I don't have it selected.

My uBO settings are the same for both browsers (but note that I'm on regular Firefox so using v1.12.1 whereas Pale Moon is 1.12.3rc0)

@gorhill gorhill closed this as completed in 22d7442 May 8, 2017
@gorhill gorhill reopened this May 8, 2017
@gorhill
Copy link
Owner

gorhill commented May 8, 2017

Argh, I meant to reference #2592 in my commit.

@gorhill
Copy link
Owner

gorhill commented May 8, 2017

why is Firefox also retrieving AdBlockProtectorList?

Surely you must have it selected. It does not download on my side.

@gorhill
Copy link
Owner

gorhill commented May 8, 2017

To be clear, uBO does download only filter lists which are used. The only exception is auxiliary resources.txt.

assets.json has to be updated (whether manually or automatically), it's key to uBO's internals, to properly show which filter lists are available in stock filter lists. So this one won't be excluded. It updates only every 13 days at most, and is quite a small file.

So this mean only resources.txt could potentially be excluded, but only in the very rare case where someone turns off redirection/injection. I lean toward declining, to keep playing with the assets management code for such very marginal "gain" for such a small set of users is not something I feel like dealing with.

@joey04
Copy link
Author

joey04 commented May 8, 2017

I agree, this is a marginal issue, so I see your point about not wanting to change the code for it.

As for the AdBlockProtectorList in Firefox using uBO 1.12.1 I see that you added this list on an April 29 commit, whereas 1.12.1 was released on April 15. So perhaps it fetched the new assets.json and decided to fetch this new list too, even though it's not selected in the dashboard.

But my Pale Moon has uBO 1.12.3rc0 which was released after the commit, so perhaps that's why it didn't fetch it.

@gorhill
Copy link
Owner

gorhill commented May 8, 2017

edit: it's impossible for me to select AdBlockProtectorList in v1.12.1 because it doesn't yet exist in the 3p list view :)

Ok, I will have a look at the code to find out if this could happen.

@joey04
Copy link
Author

joey04 commented May 8, 2017

@gorhill please ignore the "edit: it's impossible" comment of mine. It was a mistake. The new list does indeed appear in the 1.12.1 Firefox list but I missed it:

untitled

It was never selected, though, so my prior comment about commit and release dates may still apply.

@gorhill
Copy link
Owner

gorhill commented May 8, 2017

It was never selected, though

Yes, looking at the update code I see this can happen for asset entries which were added without filter lists being reloaded -- i.e. filter lists reloaded from a snapshot.

@gorhill gorhill reopened this May 8, 2017
@gorhill gorhill removed the declined label May 8, 2017
@gorhill
Copy link
Owner

gorhill commented May 8, 2017

Alright, to fix the AdBlockProtectorList-like issues, I need to play in the code which I did not want to play with, so I will just fix the resources.txt case while at it.

@gorhill gorhill closed this as completed in 1c7c703 May 8, 2017
@gorhill gorhill changed the title request: only fetch assets that are actually used request: do not update resources.txt if redirection and injection are both disabled May 9, 2017
@gorhill gorhill changed the title request: do not update resources.txt if redirection and injection are both disabled request: some unused resources are spuriously updated May 9, 2017
@gorhill
Copy link
Owner

gorhill commented May 9, 2017

I changed the title to be sure there is no misunderstanding -- for the most part uBO was already not updating unused resources.

@uBlock-user
Copy link
Contributor

resources.txt is not updating when I force update uBlock Filters, Badware risks, Experimental, Privacy and Unbreak. You once told me to remove browser cache and I did it, however still there was no change.

@gorhill
Copy link
Owner

gorhill commented May 9, 2017

Works fine here (last instance is after clearing browser cache):

a

How did you conclude that it's not being updated?

@uBlock-user
Copy link
Contributor

uBlock-user commented May 9, 2017

Force update didn't fetch the new version, so I cleared the cache of the browser and still no change. The copy of resources.txt which received the last update on my end was on April 15th, 2017.

It's found in ‪C:\Users\Username\AppData\Local\Chromium\User Data\Default\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\1.12.1_0\assets\ublock\resources.txt right ?

That file doesn't have csp.js scriptlet and no amount of force updates or removal of browsing history does anything. Ultimately I had to copy the .txt from the Internet and paste it manually.

@gorhill
Copy link
Owner

gorhill commented May 9, 2017

uBO does not write to local file system, the chrome/webext API does not allow this. The version you are looking at is the one shipped with uBO. When it updates a resource, it is saved into chrome/webext API using chrome.storage.local, which is a key-value store, not in a specific file on disk.

@uBlock-user
Copy link
Contributor

Thank you, very enlightening. So if I delete that file, it would still work fine ?

@gorhill
Copy link
Owner

gorhill commented May 9, 2017

It would work fine as long as there is a cached version available.

@stanlane
Copy link

#2623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants