Changes between Initial Version and Version 1 of Ticket #7244


Ignore:
Timestamp:
01/29/2019 07:08:27 AM (19 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7244

    • Property Ready set
    • Property Status changed from new to reviewing
    • Property Blocking changed from to 7000
  • Ticket #7244 – Description

    initial v1  
    11=== Background === 
    2 On sites with multiple frames from the same known domain, we generate the domain-specific part of the style sheet for every frame and on each page load. A lot of this redundant computation can be avoided if we simply cache the domain-specific part of the style sheet (~750 selectors in EasyList). The size of the cache could be limited to 100 entries. Even at full capacity, this would take up only ~4 MB while significantly cutting down the CPU usage in practice. 
     2On sites with multiple frames from the same known domain (e.g. msn.com), we generate the domain-specific part of the style sheet for every frame and on each page load. A lot of this redundant computation can be avoided if we simply cache the domain-specific part of the style sheet (~750 selectors in EasyList). The size of the cache could be limited to 100 entries. Even at full capacity, this would take up only ~4 MB while significantly cutting down the CPU usage in practice. 
    33 
    44In my benchmark loading [https://www.alexa.com/topsites Alexa Top 50] and profiling for one minute, I was able to reduce the amount of time spent in `generateStyleSheetForDomain` in half using this strategy. 
    55 
    66=== What to change === 
    7 Replace this text with the detailed description of what exactly shall be changed/added and where. 
     7In the `generateStyleSheetForDomain` in `lib/elemHide.js`, for the common case (not specific-only, no selectors needed), if a known domain suffix is found, cache the generated style sheet by that suffix. 
     8 
     9If the cache hits an upper limit of 100 entries, clear it and start over. 
  • Ticket #7244 – Review URL(s)

    initial v1  
     1https://codereview.adblockplus.org/29987596/