Skip to content

Loading…

[Firefox] The process of hiding elements is sometimes visible #825

Closed
Matthaiks opened this Issue · 20 comments

5 participants

@Matthaiks

It doesn't happen when elements are blocked with Your filters, though. In other words, Filter lists are sometimes slower than Your filters.

@gorhill

That's too vague. I need specifics: give me a URL where this happens, and tell me what on the page I should look for.

@Betsy25

If I correctly understand the top post, I think I might be, sort of, seeing the same regarding element hiding being visibly slower than doing the same within ABP.

I have a bunch of hiding filters for www.majorgeeks.com
When I load the page with uBlock, for example the following filter is responsible for hiding the double arrow images ( http://www.majorgeeks.com/images/arrowd.gif ) in front of the software items :

|http://www.majorgeeks.com/images/*

but upon loading the page I can see the alt="download xxxxxx" for all the items for about half a second, which doesn't happen when the same filters are used in ABP.

I do have to say, I have quite a bunch of (hiding-)filters for that domain though, I probably should remove all other filters and only try with the one posted above, to see if it is still visibly slower than ABP though.

@Matthaiks

http://ustandout.com/facebook/how-to-add-facebook-fan-box
The sidebard on the left. Block it with the Fanboy’s Social Blocking List. The sidebar won't show up if you reload the page, so restart Firefox.

@gorhill

The sidebard on the left

I tried it, and I could not see it, but I believe you, because as said in the wiki:

  • Generic cosmetic filters: injected after page's root DOM is loaded
    • These are cacheable

These may be seen the first time. In my case I didn't see them for whatever reason: could be because I work using default-deny (so there was a lot of freed CPU cycles), or because I have a quad-core, etc.

This is how uBlock works: not a bug, by design.

One way to mitigate this is to use specific cosmetic filtering, which is the mode used by default when you create your own filters:

Specific cosmetic filters: injected before page's root DOM is loaded.

Hence the difference you report.

@gorhill gorhill removed the need feedback label
@gorhill

@Betsy25

but upon loading the page I can see the alt="download xxxxxx" for all the items for about half a second, which doesn't happen when the same filter is used in ABP

What you are talking about is the "collapsing of blocked elements". ABP works no differently than uBlock for this part, and I did benchmark this part in the past and ABP was slower than uBlock in collapsing elements linked to blocked network requests (on top of this uBlock caches the results, not ABP.)

So I am skeptical about the "doesn't happen [with] ABP".

@gorhill

@Betsy Something to try, with default settings, with both uBlock and ABP with same filter lists:

http://raymondhill.net/ublock/tiles1.html

Try one and then try the other and see the difference (just F5 the page to repeat). I don't know what is your hardware, but I am pretty sure you will notice like me that uBlock is noticeably faster at hiding stuff on that page.

@Betsy25

@gorhill You're right, when I removed all other filters except the single one posted, i didn't see it, and the collapse was instantly. However, when I re-enable the multiple filters I have for majorgeeks.com, it is clearly visible again, contrary to the experience with ABP.

@gorhill

re-enable the multiple filters I have for majorgeeks.com

What are those filters? Can I see them so that I can try? (and hence explain better what is happening internally)

@Betsy25

@gorhill Those where the ones I originally exported in ABP and imported in uBlock :

|http://www.majorgeeks.com/images/*
|http://www.majorgeeks.com/search_light.gif
|http://www.majorgeeks.com/themes/majorgeeks/img/info.jpg
||google.com/cse/*$domain=majorgeeks.com
||majorgeekscom.disqus.com^
||google.com^$domain=majorgeeks.com
||majorgeeks.com/core/javaload/*$script,domain=majorgeeks.com
|http://www.majorgeeks.com/xindex.php,qct=core,aaction=tasks.pagespeed.*.png$domain=majorgeeks.com
||majorgeeks.com/mg/mg.html
||d33f10u0pfpplc.cloudfront.net^$domain=majorgeeks.com
||ox-d.majorgeeks.com^
majorgeeks.com##DIV.geekyinsidecontent:last-child
majorgeeks.com##DIV#menu1.colleft
majorgeeks.com##DIV#menu2.colright
majorgeeks.com##DIV.centerborder
majorgeeks.com##DIV.navigation
majorgeeks.com##IMG[src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAOCAMAAAAVBLyFAAAAM1BMVEWMjFmGhlOAgE2goG3AwI1zc0Czs4CZmWasrHmTk2C5uYampnN5eUbGxpNsbDlmZjP///8TAYN0AAAAEXRSTlP/////////////////////ACWtmWIAAACCSURBVBjTVc9JdkJBEAPB+gPQXYNS9z+tFxj8rGWslHFf/rfrDtHzB9MoNnR+JBt2+AI93/IUXA67BGXbBSo76swUbHuDMs8KoTUNxwE9SyiWoOYAOKZAK5wPCG/YDnikw56Gc9aaE3rssD0Bfd8NMX6T/QIJXvaXXPB77ktO6ZP1A7dVDP+Shq+PAAAAAElFTkSuQmCC"]
majorgeeks.com##SPAN.pagelink
majorgeeks.com##SPAN.pagelinkselected
|http://www.majorgeeks.com/index.php?ct=core&action=tasks
@gorhill

@Betsy25 All the cosmetic filters in there are specific, meaning they are injected before the page renders. I tried them and the page displayed cleanly the first time.

@Betsy25

@gorhill Well, it always happens here (Firefox nightly). Always see the alt="download......" part in front of the software titles for about half of a second, before they disappears, and the software titles jump to the left.

@gorhill

@Betsy25 I use FF35. Is FF-nightly something I can install without having my FF35 install being tampered with?

@Betsy25

As far as I can remember, I installed the portable version of nightly a couple of years ago, so I have the regular firefox 35 version, and the portable beta-, aurora-, and nightly versions installed that way. None is touching or using any setting or profile of another that way.
The only thing i still have to watch out for, is to never have 2 of them running at the same time, or they might indeed interfere with the profiles of each other, never really looked into that, just teached myself to only have 1 browser version open at each time.

EDIT: Even if the nightly version is installed as portable, it is daily updateble from the mozilla servers, just like the regular nightly version.

EDIT: I replaced ABP with uBlock in the regular FF v35, and while still somewhat noticable, the cosmetic filters clearly look to execute faster in FF v35 compared to FF nightly v38.

@Matthaiks

@gorhill OK, thank you for the explanation and for this great add-on.

@gitarra

@gorhill Firefox stable, Beta and Nightly by default use the same profile, you'll need to create a separate profile for use with Nightly to prevent them both from using the same profile.

Firefox Developer Edition (formerly Aurora) on the other hand uses a separate profile by default and requires no user interaction to be used simultaneously to your "normal" Firefox install.

@Betsy25

@gorhill Got any success in installing the portable Firefox nightly ?

@gorhill

I didn't try yet.

@harshanvn

Just a quick question. If one is using the dynamic filtering to block 3P requests, i believe this ads will be blocked in the first place, right? Unless they are on the same domain.
Obviously i am yet to try this on nightly version..

@gorhill

@harshanvn OP issue is about cosmetic filters. Dynamic filtering is about network requests, not DOM elements, so unrelated to OP.

I use default-deny, and I can't see OP issue. But when I use default settings, I do see very briefly the sidebar share buttons, the first time, once in a while (actually I'm having a hard time reproducing it now).

But now there is other stuff added which is drowning the OP issue: I would rather we stick to it strictly or else I will never be able to deal with the issue here, which is actually simple: by design.

Anything else should be open as a separate issue.

@gorhill

By design. Solution is to create a specific cosmetic filter, ustandout.com##.essb_links_list in the current case.

@gorhill gorhill closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.