Changes between Version 1 and Version 2 of Ticket #6957, comment 5


Ignore:
Timestamp:
09/21/2018 10:39:13 AM (13 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6957, comment 5

    v1 v2  
    11@sebastian what do you think about this idea? 
    22 
    3 The `ElemHide` module could return the style sheet along with the selectors. Internally it would have a cached "default" style sheet (see [https://codereview.adblockplus.org/29886555/ patch]), based on the list of selectors that are applied unconditionally on all domains. This would slow down the selector lookup slightly, but this would be more than offset by the fact that you wouldn't have to generate the style sheet separately. 
     3The `ElemHide` module could return the style sheet along with the selectors. Internally it would have a cached "default" style sheet (see [https://codereview.adblockplus.org/29886555/ patch]), based on the list of selectors that are applied unconditionally on all domains. This would slow down the selector lookup slightly, but this would be more than offset by the fact that the extension wouldn't have to generate the style sheet separately. 
    44 
    55The only downside is that this would be a performance hit for platforms that don't support user style sheets, but the extension could just call the old `getSelectorsForDomain` instead on those platforms.