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

manualUpdateAssetFetchPeriod=0 is ignored #3380

Closed
mikhaelkh opened this issue Dec 29, 2017 · 2 comments
Closed

manualUpdateAssetFetchPeriod=0 is ignored #3380

mikhaelkh opened this issue Dec 29, 2017 · 2 comments

Comments

@mikhaelkh
Copy link
Contributor

mikhaelkh commented Dec 29, 2017

Describe the issue

When manualUpdateAssetFetchPeriod is set 0, it seems that the value is ignored and assumed the default 2000, but I think in this case user tries to tell uBO that he wants to set the delay as little as possible and this case should be parsed accordingly.

Steps for anyone to reproduce the issue

  1. Set manualUpdateAssetFetchPeriod to 0
  2. Click Purge all caches & Update now
  3. Update is significantly slower than with manualUpdateAssetFetchPeriod set to 1.

Your settings

[If you fail to provide this info, I will mark the issue as invalid. Lists all settings which differs from default settings]

  • OS/version: Windows 10 v1607 x64
  • Browser/version: Chrome
  • uBlock Origin version: latest dev from Store (1.14.23.2)
Your filter lists
  "selectedFilterLists": [
    "https://filters.adtidy.org/extension/ublock/filters/4.txt",
    "https://easylist-downloads.adblockplus.org/cntblock.txt",
    "https://easylist-downloads.adblockplus.org/bitblock.txt",
    "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/nocoin.txt",
    "https://raw.githubusercontent.com/jspenguin2017/uBlockProtector/master/uBlockProtectorList.txt",
    "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
    "RUS-0",
    "hphosts",
    "fanboy-thirdparty_social",
    "fanboy-annoyance",
    "spam404-0",
    "malware-1",
    "disconnect-malvertising",
    "fanboy-enhanced",
    "easyprivacy",
    "adguard-spyware",
    "easylist",
    "adguard-generic",
    "awrl-0",
    "ublock-unbreak",
    "ublock-abuse",
    "ublock-privacy",
    "ublock-experimental",
    "ublock-badware",
    "ublock-annoyances",
    "ublock-filters",
    "user-filters"
  ],
@Atavic
Copy link

Atavic commented Dec 30, 2017

I think the lowest value is actually 1 while 0 is not valid there.

@jspenguin2017
Copy link
Contributor

jspenguin2017 commented Dec 30, 2017

In messaging.js:

    case 'forceUpdateAssets':
        µb.scheduleAssetUpdater(0);
        µb.assets.updateStart({ delay: µb.hiddenSettings.manualUpdateAssetFetchPeriod || 500 });
        break;

Maybe try -1? Negative value passed to setTimeout will be automatically changed to 0.

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

3 participants