brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.88k stars 2.34k forks source link

Excessive CPU usage on https://www.logos.com/ #11505

Closed ryanbr closed 4 years ago

ryanbr commented 4 years ago

Description

CPU usage increases on https://www.logos.com/

Steps to Reproduce

  1. Open https://www.logos.com/
  2. Wait 10-20 seconds, watching task manager
  3. Task manager will show high usage (see screenshot below)

Actual result:

logos taskm

Expected result:

CPU shouldn't be max'd out.

Reproduces how often:

Easily.

Brave version (brave://version info)

Version 1.13.82 Chromium: 85.0.4183.83 (Official Build) (64-bit)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

From my debugging, issue is coming from livehelpnow.net. Manually aborting this script with logos.com##+js(acis, lhnJsSdkInit) will stop cpu excessive usage.

   <div class="cms-content" id="366270"><script type="text/javascript">
window.lhnJsSdkInit = function () {
    lhnJsSdk.setup = {`
        application_id: "8cf8180a-5f50-4c57-8a69-8b6e19707db2",
        application_secret: "a2f25e77fbfd4a628504e270c4164083d02a24dd629644a688"
    };
    lhnJsSdk.controls = [{
        type: "hoc",
        id: "35b74855-6a6d-4488-833c-a1f96367e20c"
    }];
  };

(function (d, s) {
    var newjs, lhnjs = d.getElementsByTagName(s)[0];
    newjs = d.createElement(s);
    newjs.src = "https://developer.livehelpnow.net/js/sdk/lhn-jssdk-current.min.js";
    lhnjs.parentNode.insertBefore(newjs, lhnjs);
}(document, "script"));
</script></div>`

Related tracking blocks (in shields):

https://www.livehelpnow.net/lhn/handler/e.ashx?c=8489&e=Chrome:%20Uncaught%20TypeError%3A%20Cannot%20read%20property%20%27_uid%27%20of%20undefined%20line%3A6%20column%3A4444%20%7C%20&p=https%3A%2F%2Fwww.logos.com%2F https://www.livehelpnow.net/lhn/handler/e.ashx?c=8489&e=Chrome:%20Uncaught%20TypeError%3A%20Cannot%20read%20property%20%27style%27%20of%20null%20line%3A6%20column%344444&p=https%3A%2F%2Fwww.logos.com%2F

ryanbr commented 4 years ago

Reaching out for support; https://twitter.com/fanboynz/status/1299493892983672833

ryanbr commented 4 years ago

Affects Android also.

Screenshot_20200829-122445

ryanbr commented 4 years ago

Reverting commit. https://github.com/easylist/easylist/commit/0d198ea55e8953ec355eb9f7937bb9a91168311d

This may help with the cpu issues. Will re-check this

ryanbr commented 4 years ago

CPU usage looking better, no longer spiking. Closing ticket.

kjozwiak commented 4 years ago

As per the process, shield issues that have been fixed by the component updater should follow the following process: