Changes between Version 15 and Version 16 of Ticket #6428


Ignore:
Timestamp:
03/16/2019 03:24:40 PM (9 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6428 – Description

    v15 v16  
    44=== What to change === 
    55Modify `generateStyleSheetForDomain` in lib/elemHide.js to provide exception filters which applied if the optional `withExceptions` argument was passed. 
    6  
    7 Note: The `generateStyleSheetforDomain` code is a hotspot, so we must be extremely careful when modifying it to avoid extra overhead when this new argument wasn't passed (see #4057). At the same time I'd like to avoid duplicating the entire function. One way to (roughly) profile the code is to run this snippet: 
    8  
    9 {{{ 
    10 (function() { 
    11   var start = performance.now(); 
    12   for (var i = 0; i < 1000; i += 1) 
    13     ElemHide.generateStyleSheetsForDomain("www.extremetech.com"); 
    14   return performance.now() - start; 
    15 }()); 
    16 }}} 
    17  
    18 (We should test performance on the various browsers we support too, since in practice a change might speed things up on one browser and slow them down on another.)