Surrogates, GM Scripts, performance vs usefulness

Bug reports and enhancement requests
Post Reply
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Surrogates, GM Scripts, performance vs usefulness

Post by GµårÐïåñ »

al_9x wrote:Updated Google Instant surrogate

Code: Select all

user_pref("noscript.surrogate.google_preview.sources", "@^https?://www\.google\.com/search\?(?!(?:.*&)?tbm=[^&]+)");
user_pref("noscript.surrogate.google_preview.replacement", "addEventListener('DOMContentLoaded', function(e) {Array.forEach(document.getElementsByClassName('vsc'), function(e) {if (e.tagName === 'DIV' && e.hasAttribute('sig')) e.removeAttribute('sig');}); Array.slice(document.getElementsByClassName('vshid')).forEach(function(e) {if (e.tagName === 'SPAN' && !(e.previousElementSibling && e.previousElementSibling.tagName === 'SPAN' && e.previousElementSibling.classList.contains('gl')) && e.firstElementChild) {e.classList.remove('vshid'); e.classList.add('gl'); e.insertBefore(document.createTextNode(' - '), e.firstElementChild);}});}, true); addEventListener('load', function(e) {var count = typeof e === 'number' ? e : 1; var els = Array.slice(document.getElementsByClassName('vspib')); if (els.length) els.forEach(function(e) e.parentNode.removeChild(e)); else if (++count <= 2) setTimeout(arguments.callee, 100, count);}, false);");
I have to admit, I am not a big fan of Google's ideas about what we want and should want and often find them annoying and bloated. However, is this extreme reversing really necessary? It would seem that the overhead to the browser outweighs any benefit of aesthetics. Have you done a benchmark to see how badly this would affect performance? Just wondering. Specially that disabling the google instant would not be retained if you have automatic history/cache dumping, no? Now in chrome you can disable it by default using the GUI but in Fx I think you can only achieve permanent disable of that using the config, right?
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (Windows NT 6.9; rv:6.9) Gecko/69696969 Firefox/6.9
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: disabling Google instant previews and restoring cache li

Post by al_9x »

GµårÐïåñ wrote:However, is this extreme reversing really necessary?
If it's not necessary, don't use it, I don't insist.
GµårÐïåñ wrote:It would seem that the overhead to the browser outweighs any benefit of aesthetics. Have you done a benchmark to see how badly this would affect performance?
The overhead is not significant, looping through results and altering a few elements is not a big deal.
GµårÐïåñ wrote:Just wondering. Specially that disabling the google instant would not be retained if you have automatic history/cache dumping, no? Now in chrome you can disable it by default using the GUI but in Fx I think you can only achieve permanent disable of that using the config, right?
You can use the google search prefs or OptimizeGoogle extension, which maintains the prefs, while anonymizing the pref cookie. In the preferences section of optimizegoogle, check "query suggestions" (this includes the instant setting in the cookie) and uncheck "provide query suggestions" (this turns off instant)
Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: disabling Google instant previews and restoring cache li

Post by GµårÐïåñ »

al_9x wrote:If it's not necessary, don't use it, I don't insist.
First, don't be flip, that shows immaturity and lack of integrity in your standing. Second, I don't need permission or insistence of anyone to use anything, I make my own choices. Third, I didn't say you insisted, I was simply giving you the now obviously undeserved respect of peer review. Finally, anytime you do anything like this, you need to know its overhead, benchmarks, effects, etc, no matter how seemingly insignificant they might be to you; once you put it out here, its up for grabs by people and it would help those who may not know better to have more details before seeing something that seems cool, going with it and finding things got bad for them and not know why or where to look. Take a piece of humble pie and show a bit of humility because what you know is only a speck in the grand scheme of knowledge; while progress is good and shows initiative, arrogance shows lack of knowledge and immaturity. I am done here.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (Windows NT 6.9; rv:6.9) Gecko/69696969 Firefox/6.9
Tom T.
Field Marshal
Posts: 3620
Joined: Fri Mar 20, 2009 6:58 am

Re: disabling Google instant previews and restoring cache li

Post by Tom T. »

@ al_9x, GµårÐïåñ, and everyone else:

I quit using Google years ago. Lawsuit by EU over privacy violations, which continue to get worse. Continued increase in wanting to know everything about everyone.

https://ssl.scroogle.org gives full Google search capability with none of the downsides. (IMHO. YMMV.)

@ al_9x
: I'm certain that you'll continue to find new evils from Google. Your persistence in finding ways to work around them is quite commendable.
However, perhaps exposing the evils *and encouraging the use of other services* would also be a good use of time. [/soapbox]

Cheers both - Tom
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23
dhouwn
Bug Buster
Posts: 968
Joined: Thu Mar 19, 2009 12:51 pm

Re: disabling Google instant previews and restoring cache li

Post by dhouwn »

GµårÐïåñ wrote:However, is this extreme reversing really necessary? It would seem that the overhead to the browser outweighs any benefit of aesthetics.
Couldn't that be said about most larger NS surrogate and GM scripts?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: disabling Google instant previews and restoring cache li

Post by GµårÐïåñ »

dhouwn wrote:Couldn't that be said about most larger NS surrogate and GM scripts?
Indeed. However, several differences between the surrogates used by NS and GM scripts IMHO and professional observations.

NS uses the surrogates at a level which allows better control over code injections/stripping than some solutions that rely on POST processing of a document content (ie. GM). Additionally, NS doesn't really re-invent the wheel with the intention of reverse engineering the offending code, it simply strips of its payload and allows normal functionality through ghosting/facade that the site is oblivious to, a SECURITY upside and benefit from tracking/privacy invasions. NS surrogates hardly, if at all, involve aesthetic changes and are focused on security only which often result in much smaller and therefore lower overhead changes to the "code".

GM scripts can take ANYTHING and make it go further and do things with it and many addons in fact use the same GM infrastructure to do their thing (often why slow and cause clashes with other solutions) and can be very slow if taken too far. Although I use GM scripts for many tasks to be AUTOMATED, I hardly ever use them for stripping or aesthetic changes to the website I am dealing with as it is slow, subject to bugs due to even the slightest code changes by the "offending" site and at the end of the day can be mostly castrated effectively by NS, RP, ABP and to some lesser fringe extent Ghostery/Abine. For all intents and purposes my current configuration and I hardly find any annoyances worth going nuclear over.

Hope that helps clear up WHY I asked and made that statement, I wasn't dismissing the solution, simply asking if it was worth it and benchmarks are critical in answering that question but it was taken as something else which I don't wish to waste any more time addressing. Just because you CAN do something, doesn't mean you should or its worth doing. However, since you were kind enough to ask a legitimate question in follow-up to what I had said asking what I meant, rather than just dismissing it, I feel this reply should cover what I was thinking. I am always open to other views, as long as they are respectful and open to critique rather than based in absolute belief. We can disagree but no need to get nasty over it. Anyway, I know you do alot of digging yourself, so penny for your thoughts and personal observations on this?
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/6.9 (Windows NT 6.9; rv:6.9) Gecko/69696969 Firefox/6.9
Post Reply