Closed beerisgood closed 4 years ago
When I try youtube, everything works fine. Can you provide the link which does not play?
The link was https://www.youtube.com/watch?v=N39NXEzDJyE
It play after a long time but YouTube get freezed for a while and nothing happens. Without the filter, the video start immediately without freeze
Thanks,
Had to lower the fences, but adblocking should not cause website breakage. I checked and it seems okay, Could you check whether all works as expected?
I will test it if I'm back at home (Friday)
OK, thx
Haven't tested with your rules, but
youtube.com/api/stats/watchtime?$image
is whitelisted on EasyPrivacy.
tho I block this and don't see an issue as long as not logged in.
Also
||youtube.com/youtubei/
might cause trouble tho I don't see an issue by blocking
||youtube.com^*/log_event?
(||youtube.com/youtubei/
blocks bit more)
@LennyFox i remove your list, then re-add it but this time i don't click "mark this as trusted filter" in AdGuard. No more problems .
But with this setting enabled, the problem come is back again. Info about trusted filters: https://github.com/AdguardTeam/FiltersRegistry#trust-levels
@Alex-302
None of his filters requires high trust-level. Sorry, I haven't looked MyBookMraks. This filter requires high trust.
This video plays without any problem: https://www.youtube.com/watch?v=N39NXEzDJyE
I can't replay this issue, so I am closing it
these rules potentially can slowdown the site on the old PC(also better use #?#
for extended CSS rules)
Just a info: my PC is a AMD Ryzen 5-2600 with SSD, 16GB DDR4 RAM and Radeon RX 5700 so i wouldn't call that a old or weak PC.
@beerisgood not old PC, but in any case these rules are slow(JS with regexp).
Computational complexity helps to understand why regex is bad. The complexity of matching X regex rules to a n-length string is roughly O(Xn) scale (it depends) while good X rules at most O(n), this means adding regex rules proportionally adds computational cost while good rules don't - thus, as a very old ABP post stated, 1 regex rule is worse than 20 normal rules - no optimization can solve this fundamental difference. For the same reason, ##.ad
should be preferred than ##[class^=ad]
or ##[class$=ad]
and these two preferred than `##[class=ad]if they all work. Also standard selector should be preferred than extended CSS, and
:has()than
:contains()`. But another thing to remember is ideally a cosmetic rule should cover all targets AND ONLY them - I mean, if something is hidden by another rule, better to avoid double-hide it by carefully choosing the selector. That said, it's okay to add a bit more specification to avoid potential FP as websites changes too often - the most troublesome part for any filter maintainer (adding a rule is easy, removing obsolete one is not).
EDIT: corrected the link
With your filter, YouTube break and need a long time with higher performance loose then normally.
Here a screenshot: