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

Number of blocked requests on the extension icon appears few seconds late after the webpage loading stops #155

Closed
7 of 8 tasks
ghost opened this issue Aug 4, 2018 · 17 comments
Labels
enhancement New feature or request fixed issue has been addressed

Comments

@ghost
Copy link

ghost commented Aug 4, 2018

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

Number of blocked requests on the extension icon appear second or two late after the webpage load.

A specific URL where the issue occurs

https://www.google.com/

Steps to Reproduce

  1. Disable all extensions and only keep uBO enabled.

  2. Browse to google.com and wait for the page to get loaded and notice that number of blocked requests appear second or two after the page loading stops.

  3. For the sake of comparision, install v1.9.14 side by side and run both versions together on google.com, notice that with v1.9.14, the number of blocked requests appears as soon as the page is loaded but the latest dev build version take a second or two for that number to appear.

  4. Refresh the page few more times to be able to reproduce this issue at will.

Watch the video I have attached below which displays the bug when compared with version v1.9.14 side-by-side. Reproducible on Firefox too but I can't provide a video of side by side comparison due to Firefox not allowing to install two versions side by side.

Expected behavior:

Number of blocked requests on the extension icon appears as soon as the webpage loading stops.

Actual behavior:

Number of blocked requests on the extension icon appears after a second or two late after the webpage loading stops. This started happening after v1.9.14.

Supporting Evidence

https://i.gyazo.com/22ab15443943f1ca7254f1b022beab65.mp4

Your environment

  • uBlock Origin version: 1.16.15rc0
  • Browser Name and version: Chrome 70/Firefox 63
  • Operating System and version: Win 10 x64 1807 build
@uBlock-user uBlock-user added the bug Something isn't working label Aug 4, 2018
@ghost ghost changed the title Number of blocked requests on the badge icon appears few seconds late after the webpage loading stops Number of blocked requests on the extension icon appears few seconds late after the webpage loading stops Aug 4, 2018
@gorhill
Copy link
Member

gorhill commented Aug 4, 2018

For two reasons:

  1. By design because displaying the block count has the lowest priority among all the tasks uBO has to handle. It would be inefficient to give a higher priority to the badge on the icon, the assumption is that calls to the API framework should be coalesced for efficiency purpose.

  2. Because uBO has to buffer results of the processing of network requests to ensure they are properly reported: uBlock blocking domain but not showing it in the dynamic filtering pane gorhill/uBlock#2053. The fix to this issue required to introduce a delay before deciding what document owns a network request.

@ghost
Copy link
Author

ghost commented Aug 4, 2018

Yeah but this wasn't the behaviour on 1.9.14, why is that ?

@gorhill
Copy link
Member

gorhill commented Aug 4, 2018

Pointed out above: gorhill/uBlock#2053. Fixed in 1.9.16.

@ghost
Copy link
Author

ghost commented Aug 4, 2018

Ah, I see. OKay I will close it then.

@ghost ghost closed this as completed Aug 4, 2018
@ghost
Copy link
Author

ghost commented Aug 4, 2018

I don't see the same behavior on uMatrix, doesn't it suffer from that issue ?

@uBlock-user uBlock-user added wontfix won't be addressed and removed bug Something isn't working labels Aug 4, 2018
@gorhill
Copy link
Member

gorhill commented Aug 4, 2018

uMatrix is less sensitive to the issue affecting uBO, so I did not port the journaling code in uMatrix.

uMatrix is less sensitive to the issue because unlike uBO, the slate is not cleared on page reload.

@ghost
Copy link
Author

ghost commented Aug 4, 2018

Can the delay timer be reduced a bit ?

@gorhill
Copy link
Member

gorhill commented Aug 4, 2018

Why? It's just a cosmetic "issue", what would be the point to mess with code which works fine as it is?

@ghost
Copy link
Author

ghost commented Aug 4, 2018

Because seeing it appear after whole 2 seconds or so have passed, is visually annoying to me atleast(and would be to others who also start noticing it), no other reason.

@gorhill
Copy link
Member

gorhill commented Aug 4, 2018

I am going to add an advanced hidden setting to control the timing of journaling.

@gorhill gorhill reopened this Aug 4, 2018
@ghost
Copy link
Author

ghost commented Aug 5, 2018

Thanks for considering my plea.

@Thorin-Oakenpants
Copy link

@rjkpa FYI you can run concurrent firefox profiles, and even different Ff releases (as long as one is a portable version) - see https://github.com/ghacksuserjs/ghacks-user.js/wiki/2.3-Concurrent-Profiles

@ghost
Copy link
Author

ghost commented Aug 5, 2018

That's for running multiple profiles, not the same thing as I did on Chromium.

as long as one is a portable version

I'm on portable, but you can't run two versions of the same extension on a single profile like you can do on Chromium, Firefox won't allow me to install the extension whatsoever.

@Thorin-Oakenpants
Copy link

Thorin-Oakenpants commented Aug 5, 2018

^^ Sorry for going off topic, but you can run two or more FFs - each has it's OWN profile (that's the point). No one ever said to use the same profile simultaneously, although I can see that installed versions would auto-pickup on existing profiles.

on a single profile like you can do on Chromium

I'm not a chrome user, so I have no idea what you did in chrome. Sometimes I assume people already know things. I do not use installed FF either, so not sure on running two or more different installed FFs versions, but definitely with portable (or only one installed) you can.

But you are right - you can't use the same profile concurrently. I never said you could. Read the wiki. I said you can run concurrent profiles (and thus this allows you to ALSO run concurrent FF versions).

Quote: me

"FYI you can run concurrent firefox profiles, and even different Ff releases"

I said profiles, plural, with an s. This allows you to run multiple firefox.exe's. End of story. If you want to badger on about it, I am not interested. Why do you keep harping on about chromium? Don't answer.

@uBlock-user uBlock-user added something to address something to address and removed wontfix won't be addressed labels Aug 5, 2018
@ghost
Copy link
Author

ghost commented Aug 5, 2018

but you can run two or more FFs - each has it's OWN profile (that's the point).

I knew that, ofcourse. I prefer the chromium behaviour instead, as I'm a chromium enthusiast and I'm not willing to go that far for a browser that I do not use everyday.

gorhill added a commit to gorhill/uBlock that referenced this issue Aug 31, 2018
<#3436>: a new per-site switch
has been added, no-scripting, which purpose is to wholly disable/enable
javascript for a given site. This new switch has precedence over all
other ways javascript can be disabled, including precedence over dynamic
filtering rules.

The popup panel will report the number of script resources which have
been seen by uBO for the current page. There is a minor inaccuracy to
be fixed regarding the count, and which fix requires to extend request
journaling.

<#308>: the `noscript` tags will
now be respected when the new no-scripting switch is in effect on a given
site.

A default setting has been added to the _Settings_ pane to
disable/enable globally the new no-script switch, such that one can
work in default-deny mode regarding javascript execution.

<uBlockOrigin/uBlock-issues#155>: a new
hidden setting, `requestJournalProcessPeriod`, has been added to
allow controlling the delay before uBO internally process it's
network request journal queue. Default to 1000 (milliseconds).
@gorhill
Copy link
Member

gorhill commented Aug 31, 2018

The new advanced setting has been added: requestJournalProcessPeriod, default to 1000 (milliseconds). This will be in next dev build.

@gorhill gorhill closed this as completed Aug 31, 2018
@uBlock-user uBlock-user added fixed issue has been addressed enhancement New feature or request and removed something to address something to address labels Sep 1, 2018
@ghost
Copy link
Author

ghost commented Sep 1, 2018

Perfect, that works brilliantly! I set it to 500(ms) and the original behaviour is back, thanks a lot for adding this!

hawkeye116477 added a commit to hawkeye116477/uBlock-for-firefox-legacy that referenced this issue Oct 8, 2020
…es#155

<gorhill#95>: a new per-site switch
has been added, no-scripting, which purpose is to wholly disable/enable
javascript for a given site. This new switch has precedence over all
other ways javascript can be disabled, including precedence over dynamic
filtering rules.

The popup panel will report the number of script resources which have
been seen by uBO for the current page. There is a minor inaccuracy to
be fixed regarding the count, and which fix requires to extend request
journaling.

<gorhill/uBlock#308>: the `noscript` tags will
now be respected when the new no-scripting switch is in effect on a given
site.

A default setting has been added to the _Settings_ pane to
disable/enable globally the new no-script switch, such that one can
work in default-deny mode regarding javascript execution.

<uBlockOrigin/uBlock-issues#155>: a new
hidden setting, `requestJournalProcessPeriod`, has been added to
allow controlling the delay before uBO internally process it's
network request journal queue. Default to 1000 (milliseconds).

Co-authored-by:  gorhill <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

3 participants