Opened 3 years ago

Last modified 4 months ago

#4322 new defect

Counter increases without stopping

Reported by: SMed79 Assignee:
Priority: Unknown Milestone:
Module: User-Interface Keywords:
Cc: kzar, sebastian, greiner, mapx, jeen Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by greiner)

Environment

Linux & Win
Firefox 48 / Adblock Plus 2.7.3
Chromium 51 / Adblock Plus 1.12.1

How to reproduce

  1. Add the filter ||mon-compte.org/img/probleme-compte.png
  2. Go to » http://mon-compte.org/skype/

Observed behaviour

The hits counter of blocked elements increments into infinity.

Expected behaviour

The hits counter of blocked elements should stop counting.

What to change

  • When the blocked count reaches 500 set the icon badge text and the respective text in the icon popup to .
  • Don't update the page-specific blocked count or the icon badge text anymore after that to avoid unnecessary CPU usage.
  • Keep incrementing the total blocked count.

See also ui#222.

Change History (27)

comment:1 Changed 3 years ago by mapx

  • Cc trev kzar sebastian greiner mapx added

comment:2 Changed 3 years ago by mapx

Probably would be useful a more general approach: stop such blocking after "n" occurrences for any blocked element (excepting multi frames pages as youtube, facebook ..)

Last edited 3 years ago by mapx (previous) (diff)

comment:3 Changed 3 years ago by mapx

however in this case enough using this hiding filter

mon-compte.org##IMG[src="http://mon-compte.org/img/probleme-compte.png"]

comment:4 Changed 3 years ago by sebastian

It seems that if that image fails loading, a script on that page keeps reloading it forever. I suppose the ad counter going up in that case would be the expected behavior, as Adblock Plus is effectively blocking that image again every time the page re-tries loading it.

Not blocking repeated requests, as mapx suggests, is probably a very bad idea, as websites would be able to easily circumvent us then by simply re-sending requests.

comment:5 Changed 3 years ago by greiner

  • Cc athornburgh added

Expected behaviour
The hits counter of blocked elements should stop counting.

Why is that the expected behavior? If the site is requesting some resource infinitely many times then the counter should reflect that. That way you can at least see that there's an issue with the site when, for instance, your CPU usage increases all of a sudden. Therefore I'd consider this to be a feature, not a bug.

The real issue I see is that it currently looks like a problem with Adblock Plus, not a problem with the website. There should be some way to improve the user experience for this case so I added Aaron to CC.

comment:6 Changed 3 years ago by trev

I think the request isn't really about stopping to block things, rather about not counting the same resource multiple times. Regardless of whether this is a good idea in the first place, it won't work under all circumstances either - e.g. requests made by jQuery always have a unique URL even when requesting the same resource.

In this particular case there is clearly an issue with this webpage - it keeps requesting the same images each second, regardless of whether these are blocked (visible in Diagnostics on Firefox as well). While I couldn't find the problematic code immediately, I guess that there is some innerHTML manipulation going on there.

Either way, the only meaningful solution that I can see is restricting this counter - e.g. displaying "99+" if it runs too high (we can still show the exact number in the bubble). This should also limit the annoyance factor here.

comment:7 Changed 3 years ago by mapx

perhaps in this case it is not a real CPU high-usage problem but in many other cases (especially in chrome) it is. It's the reason of my suggestion (eventually attaching a counter on filter and not on request).
Alternatively establishing a general limit number of blocking events on page (available eventually as an option parameter to be modified by the advanced users).

comment:8 Changed 3 years ago by trev

Feel free to provide examples of "many other cases" (as a separate issue, not related to the one here) - I am only aware of one such case where blocking a tracking request made the script go into an endless loop. Generally, not blocking isn't a good solution.

comment:10 Changed 3 years ago by greiner

Either way, the only meaningful solution that I can see is restricting this counter - e.g. displaying "99+" if it runs too high (we can still show the exact number in the bubble). This should also limit the annoyance factor here.

I disagree since the issue is not that the counter grows to large but that the website doesn't follow best practices. Anyway, I'd rather leave this to our user experience designers.

comment:11 Changed 3 years ago by greiner

  • Cc jeen added; athornburgh removed

comment:12 follow-up: Changed 3 years ago by jeen

Hi all, I agree that the problem isn't the counter, but about making the user aware that there is a problem with something on the web page itself. The notification bubble in this case, should look and behave slightly differently to normal to demonstrate that there is a problem. A counter going up to infinity can alert the user to the problem, but as Greiner pointed out 1) it can look like there is a problem with the extension 2) it doesn't explain the problem to the user , and 3) is also distracting.

I imagine having either a static alert after n instances so either it goes to 99+, or shows an infinity symbol - perhaps it glows to draw attention to it? And within the menu, include additional information: a warning message relating to the problem, and provide suggestions on what to do -i.e. restart your browser, close your tab etc.

comment:13 Changed 3 years ago by jeen

Last edited 3 years ago by jeen (previous) (diff)

comment:14 Changed 3 years ago by jeen

Last edited 3 years ago by jeen (previous) (diff)

comment:15 Changed 3 years ago by jeen

Last edited 3 years ago by jeen (previous) (diff)

comment:16 follow-up: Changed 3 years ago by mapx

The real issue is high cpu usage or even browser / system crash. If you visit a page like that and for some reason go away for 10 minutes or more .. or even change the tab, your system/ browser will crash.

For the user this is an extension issue. Even providing an alert message, there are pages where the counter will show thousands blocked elements in 1-2 minutes. This means you can do nothing (memory / CPU usage 100%).

comment:17 in reply to: ↑ 16 Changed 3 years ago by SMed79

Replying to mapx:

This means you can do nothing (memory / CPU usage 100%).

The first time i didn't pay attention to the counter until i noticed that my browser / system slow.

comment:18 in reply to: ↑ 12 ; follow-up: Changed 3 years ago by greiner

Replying to jeen:

I imagine having either a static alert after n instances so either it goes to 99+, or shows an infinity symbol - perhaps it glows to draw attention to it?

Note that there are legitimate scenarios when we block more than 99 requests on a page (e.g. when you browse through YouTube the counter never resets because you never leave the page). Maybe we could determine how fast the counter is changing so that only if a lot of requests were blocked within a short period of time, we'd stop the counter and show the proposed "∞" symbol.

Anyway, I'm open to other suggestions on how to determine when to switch to infinity and I agree that in combination with the info text in the icon menu, this could be a good solution. Hopefully, that way we can educate users how they can deal with the problem without annoying them with our counter.

comment:19 in reply to: ↑ 18 Changed 3 years ago by jeen

Replying to greiner:

Note that there are legitimate scenarios when we block more than 99 requests on a page (e.g. when you browse through YouTube the counter never resets because you never leave the page). Maybe we could determine how fast the counter is changing so that only if a lot of requests were blocked within a short period of time, we'd stop the counter and show the proposed "∞" symbol.

Yes showing "∞" based on the speed at which the counter is increasing at is a good solution.

Although if the user has switched to a different tab, this still would not alert the user to the problem. Is there a way we could somehow show in the favicon that there is unusual behaviour on a tab?

comment:20 Changed 3 years ago by mapx

another example:
http://www.natureworldnews.com/

only easylist enabled, main page, keep scrolling the page.

And again, it's not about an aesthetic / cosmetic / notification issue. It's about system resources, high cpu usage, crashes, please don't ignore all these things.

Last edited 3 years ago by mapx (previous) (diff)

comment:21 Changed 14 months ago by fhd

  • Cc trev removed

comment:22 Changed 9 months ago by SMed79

Something is planned here to improve the user experience?

https://i.cubeupload.com/gAh2nT.png

https://i.cubeupload.com/StFaN5.png

comment:23 Changed 9 months ago by greiner

  • Component changed from Unknown to User-Interface
  • Description modified (diff)

Thanks for bringing this up again. Looking at it again, I tend to disagree that we should alert the user of a problem because it isn't actually one.

We have yet to figure out when to switch over to infinity though and on that front I'm disagreeing with my own assessment because lots of requests may be blocked in a short time during page load.
Instead, switching the counter over at a certain amount of blocked requests (e.g. 500) seems more intuitive so I've updated the ticket description to outline my proposal.

comment:24 Changed 4 months ago by greiner

  • Description modified (diff)

Added link to GitLab issue.

comment:25 Changed 4 months ago by greiner

  • Description modified (diff)

comment:26 Changed 4 months ago by SMed79

At www.dotmsr.com, I am getting a high CPU usage because of the ~200 hits per second to https://api.ipify.org/?format=json blocked by EasyPrivacy.

comment:27 Changed 4 months ago by greiner

I can't reproduce that issue but it sounds like it needs to be fixed in the code which makes those requests because that's not a good way to handle failing requests regardless of what's causing them to fail.

Note: See TracTickets for help on using tickets.