@@ -425,14 +425,6 @@ const HTTPSRules = {
425425 if ( gitCommitQuery . executeStep ( ) ) {
426426 this . GITCommitID = gitCommitQuery . row . git_commit ;
427427 }
428-
429- try {
430- if ( HTTPSEverywhere . instance . prefs . getBoolPref ( "performance_tests" ) ) {
431- this . testRulesetRetrievalPerformance ( ) ;
432- }
433- } catch ( e ) {
434- this . log ( WARN , "Exception during testing " + e ) ;
435- }
436428 return ;
437429 } ,
438430
@@ -683,36 +675,6 @@ const HTTPSRules = {
683675 return results ;
684676 } ,
685677
686- testRulesetRetrievalPerformance : function ( ) {
687- // We can use this function to measure the impact of changes in the ruleset
688- // storage architecture, potentiallyApplicableRulesets() caching
689- // implementations, etc.
690- var req = Cc [ "@mozilla.org/xmlextras/xmlhttprequest;1" ]
691- . createInstance ( Ci . nsIXMLHttpRequest ) ;
692- req . open ( "GET" , "https://www.eff.org/files/alexa-top-10000-global.txt" , false ) ;
693- req . send ( ) ;
694- var domains = req . response . split ( "\n" ) ;
695- var domains_l = domains . length - 1 ; // The last entry in this thing is bogus
696- var prefix = "" ;
697- this . log ( WARN , "Calling potentiallyApplicableRulesets() with " + domains_l + " domains" ) ;
698- var count = 0 ;
699- var t1 = new Date ( ) . getTime ( ) ;
700- for ( var n = 0 ; n < domains_l ; n ++ ) {
701- if ( this . potentiallyApplicableRulesets ( prefix + domains [ n ] ) . length != 0 )
702- count ++ ;
703- }
704- var t2 = new Date ( ) . getTime ( ) ;
705- this . log ( NOTE , count + " hits: average call to potentiallyApplicableRulesets took " + ( t2 - t1 ) / domains_l + " milliseconds" ) ;
706- count = 0 ;
707- t1 = new Date ( ) . getTime ( ) ;
708- for ( var n = 0 ; n < domains_l ; n ++ ) {
709- if ( this . potentiallyApplicableRulesets ( prefix + domains [ n ] ) . length != 0 )
710- count ++ ;
711- }
712- t2 = new Date ( ) . getTime ( ) ;
713- this . log ( NOTE , count + " hits: average subsequent call to potentiallyApplicableRulesets took " + ( t2 - t1 ) / domains_l + " milliseconds" ) ;
714- } ,
715-
716678 /**
717679 * If a cookie's domain attribute has a leading dot to indicate it should be
718680 * sent for all subdomains (".example.com"), return the actual host part (the
0 commit comments