@@ -638,20 +638,24 @@ const HTTPSRules = {
638638 req . open ( "GET" , "https://eff.org/files/alexa-top-10000-global.txt" , false ) ;
639639 req . send ( ) ;
640640 var domains = req . response . split ( "\n" ) ;
641- this . log ( WARN , "Got array of length " + domains . length ) ;
642641 var domains_l = domains . length - 1 ; // The last entry in this thing is bogus
642+ this . log ( WARN , "Calling potentiallyApplicableRulesets() with " + domains_l + " domains" ) ;
643+ var count = 0 ;
643644 var t1 = new Date ( ) . getTime ( ) ;
644645 for ( var n = 0 ; n < domains_l ; n ++ ) {
645- this . potentiallyApplicableRulesets ( "www." + domains [ n ] ) ;
646+ if ( this . potentiallyApplicableRulesets ( "www." + domains [ n ] ) . length != 0 )
647+ count ++ ;
646648 }
647649 var t2 = new Date ( ) . getTime ( ) ;
648- this . log ( NOTE , domains_l + " calls to potentiallyApplicableRulesets took " + ( t2 - t1 ) / 1000.0 + " seconds" ) ;
650+ this . log ( NOTE , count + " hits: average call to potentiallyApplicableRulesets took " + ( t2 - t1 ) / domains_l + " milliseconds" ) ;
651+ count = 0 ;
649652 t1 = new Date ( ) . getTime ( ) ;
650653 for ( var n = 0 ; n < domains_l ; n ++ ) {
651- this . potentiallyApplicableRulesets ( "www." + domains [ n ] ) ;
654+ if ( this . potentiallyApplicableRulesets ( "www." + domains [ n ] ) . length != 0 )
655+ count ++ ;
652656 }
653657 t2 = new Date ( ) . getTime ( ) ;
654- this . log ( NOTE , domains_l + " subsequent calls to potentiallyApplicableRulesets took " + ( t2 - t1 ) / 1000.0 + " seconds " ) ;
658+ this . log ( NOTE , count + " hits: average subsequent call to potentiallyApplicableRulesets took " + ( t2 - t1 ) / domains_l + " milliseconds " ) ;
655659 } ,
656660
657661 shouldSecureCookie : function ( applicable_list , c , known_https ) {
0 commit comments