Brave-browser: mobile.twitter.com right click hang

Created on 7 Dec 2018  ·  9Comments  ·  Source: brave/brave-browser

Test plan

See https://github.com/brave/brave-core/pull/2043

Description


Right clicking on mobile.twitter.com hangs the entire tab for a few seconds.

Steps to Reproduce

  1. Log into twitter.com and go to mobile.twitter.com
  2. Right click on any part of the page, preferably an external link.

Actual result:


Devtools Performance panel screenshot, see the long “Event (context menu)”. Right click menu doesn’t appear until it ends executing all that Javascript, so 11 seconds.

Devtools performance panel screenshot

Expected result:

Right click menu pops up very quickly.

Reproduces how often:


Always.

Brave version (brave://version info)

Brave | 0.57.18 Chromium: 71.0.3578.80 (Official Build) (64-bit)
-- | --
Revision | 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS | Mac OS X
JavaScript | V8 7.1.302.28
Flash | (Disabled)
User Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36
Command Line | /Applications/Brave Browser.app/Contents/MacOS/Brave Browser --disable-domain-reliability --disable-chrome-google-url-tracking-client --no-pings --enable-features=EnableEmojiContextMenu,DesktopPWAWindowing,fill-on-account-select,NewExtensionUpdaterService --disable-features=SharedArrayBuffer,DefaultEnableOopRasterization,VizDisplayCompositor,AutofillSaveCardSignInAfterLocalSave,AutofillServerCommunication,UnifiedConsent --flag-switches-begin --flag-switches-end

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? YES

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields? NO
  • Is the issue reproducible on the latest version of Chrome? NO

Additional Information

QA Pass-Linux QA Pass-Win64 QA Pass-macOS QTest-Plan-Specified QYes prioritP2 release-noteinclude webcompat

Most helpful comment

Quick update - the problem is with our cosmetic filtering code. A unique selector is calculated on right click, in the event that you go into the Brave menu and choose Block element via selector

Looking into a fix now...

All 9 comments

I just experienced this too. The lag took 14.4s.

Brave | 0.59.20 Chromium: 72.0.3626.28 (Official Build) beta(64-bit)
-- | --
Revision | 997b1040b63bac324e815797ba52be0cd8f616ed-refs/branch-heads/3626@{#461}
OS | Linux
JavaScript | V8 7.2.502.13
Flash | (Disabled)
User Agent | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.28 Safari/537.36

Well, mobile.twitter.com is now officially the new twitter.com, I just got upgraded to it.

I've dug a bit on this issue and found that the cause of the few seconds hang is the unique-selector running while trying to find a unique css selector to block an ad with.

I've opened a pull request for the fix here https://github.com/brave/brave-extension

This also happens on Windows 10.

Brave Version 0.61.51 Chromium: 73.0.3683.75 (Official Build) (64-bit)

Quick update - the problem is with our cosmetic filtering code. A unique selector is calculated on right click, in the event that you go into the Brave menu and choose Block element via selector

Looking into a fix now...

@brave/legacy_qa once we get a nightly that includes https://github.com/brave/brave-core/pull/2043 & https://github.com/brave/brave-core/pull/2063, we'll need to go through the test plans to ensure that it's working as expected and didn't cause any other obvious performance issues or regressions. We would like to get this uplifted into 0.63.x as well but need to make sure it's working on nightly.

Verification passed on

Brave | 0.63.40 Chromium: 74.0.3729.61 (Official Build) beta (64-bit)
-- | --
Revision | 5df2c8936783bd7575987e45d72a92fcf528496b-refs/branch-heads/3729@{#645}
OS | Windows 10 OS Build 17134.523

Verification PASSED on macOS 10.14.4 x64 using the following build:

Brave | 0.63.41 Chromium: 74.0.3729.61 (Official Build) beta(64-bit)
-- | --
Revision | 5df2c8936783bd7575987e45d72a92fcf528496b-refs/branch-heads/3729@{#645}
OS | Mac OS X

Verification passed on

Brave | 0.63.42 Chromium: 74.0.3729.75 (Official Build) beta(64-bit)
-- | --
Revision | fdb7915642fef8cf997beac2554709d148e3c187-refs/branch-heads/3729@{#754}
OS | Ubuntu 18.04 LTS

Used test plan from https://github.com/brave/brave-core/pull/2043 and https://github.com/brave/brave-browser/issues/2410#issue-388834617

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sondro picture Sondro  ·  3Comments

simonhong picture simonhong  ·  3Comments

kjozwiak picture kjozwiak  ·  3Comments

AlexCombas picture AlexCombas  ·  3Comments

fmarier picture fmarier  ·  3Comments