brave / brave-browser

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

User input lags after being idle #15227

Open DerGernTod opened 3 years ago

DerGernTod commented 3 years ago

Description

ever since a few months, my brave browser hangs for a few hundred ms after being idle for about 20 seconds.

Steps to Reproduce

  1. go to a page with a lot of text, e.g. https://doc.rust-lang.org/book/ch00-00-introduction.html
  2. wait for the page to be completely loaded, then do nothing for 20 seconds
  3. scroll

Actual result:

the scroll happens with a delay of 500-1500ms. it seems like the delay is longer if the idle time is longer

Expected result:

the scroll happens immediately

Reproduces how often:

always

Brave version (brave://version info)

Brave 1.22.70 Chromium: 89.0.4389.105 (Official Build) (64-bit)
Revision 14f44e21a9d539cd49c72468a29bfca4fa43f710-refs/branch-heads/4389_90@{#7}
OS Windows 10 OS Version 2009 (Build 19042.867)

also tried it with Version 1.21.76 Chromium: 89.0.4389.86 (Official Build) (64-bit)

Other Additional Information:

Miscellaneous Information:

i already tried to create a new profile, private mode, without any extensions, happens even on two different pcs (my work laptop (dell precision 5530) and my private laptop (razer blade 2016). already tried to reset all chrome://flags to default, and tried to disable threaded scrolling but this also doesn't change anything. the problem doesn't happen in the latest chrome.

LoZio commented 3 years ago

Same here. Using 1.22.71 Chromium: 89.0.4389.114 (Official Build) (64-bit) on Win10 20H2. Each time I find a document to read that is longer than a page, I stop to read the first part and it takes 15/30 seconds, then try to scroll using the mouse wheel and the action happens after 1,5/2 seconds. Then it is snappy again until I do not scroll for the 15/30s period. It is reproducible, it does the same on every site and every time.

kjozwiak commented 3 years ago

I couldn't reproduce the above on my Win 10 x64 machine that's usually running the latest Nightly. I had https://doc.rust-lang.org/book/ch00-00-introduction.html opened for ~a week or so while the machine went to sleep every night. Once it woke up from sleep, I found the tab with https://doc.rust-lang.org/book/ch00-00-introduction.html and scrolled through it.

Also tried scrolling through it a bit. Stopping/waiting ~30s and continuing. @rebron maybe you can give it a go and see if you can reproduce. @StephenBass I think you mentioned you'll give this a go as well. Did you end up reproducing/running into something similar?

LoZio commented 3 years ago

Now running Version 1.23.73 Chromium: 90.0.4430.85 (Official Build) (64-bit) on Win 10 x64 20H2 Another easy way to reproduce is using Google sheets, I do that daily. Open a sheet, click on the various cells. It immediately switches between cells. Do something other for some minutes in other tabs, pass to the tabs where you left the Google sheet. When you click on a cell it hangs for a second, then it is again alive until you leave it alone for some minutes. Same machine, same sheets, Edge/FF do not exhibit this behavior.

DerGernTod commented 3 years ago

@LoZio this is different to what i experience (i didn't try it with google sheets though). when i switch tabs, work on another tab for a while and switch back to a tab that i haven't used for a while, user inputs are triggered fast, without any problems. maybe noteworthy to reproduce this: both laptops i mentioned in the description have a dedicated graphics card, and an integrated intel GPU.

LoZio commented 3 years ago

Same here, Dell laptop with integrated Intel + NVidia Quadro

augustofg commented 3 years ago

I've been experiencing the same issue for several months (Version 1.25.68 Chromium: 91.0.4472.77 (Official Build) ArchLinux x86_64). It seems to happen more often when you have a tab open with a more demanding javascript page running in the background (but not too demanding, 10-24% cpu usage for a single core).

rebron commented 3 years ago

@DerGernTod Are you still experiencing this same performance issue with 1.26.77 our latest version?

DerGernTod commented 3 years ago

i just updated and tested it. it seems much better, but there's still a small delay (probably around 250ms) before the scroll actually happens. also, it seems that you have to wait longer for it to happen.

LoZio commented 3 years ago

I switched to Edge after this and another bug. Going back to Brave feels that anything is more sluggish. I did the same Google Sheet test as above, on the same machine, and the delay is still there. I honestly can't say if it is worse or better than before being away from Brave since some time.

Edit: Version 1.27.109 Chromium: 92.0.4515.115 (Official Build) (64-bit) Win10 x64

rebron commented 3 years ago

@LoZio It already sounds like you switched over to Edge, we still want to track down this issue though. If you have a moment, can you check if brave://settings/system turning off hardware acceleration helps with the performance. Would also like to see what you have recorded in here: brave://gpu/

LoZio commented 3 years ago

@LoZio It already sounds like you switched over to Edge, we still want to track down this issue though. If you have a moment, can you check if brave://settings/system turning off hardware acceleration helps with the performance. Would also like to see what you have recorded in here: brave://gpu/

With HW acceleration disabled it is definitely much snappier, no delays after leaving the sheet alone for some time.

DerGernTod commented 3 years ago

I can confirm that turning off hardware acceleration seems to resolve the issue. Here's the logs from the GPU page:

<html>
<body>
<!--StartFragment--><div style="box-sizing: border-box; user-select: text; margin-bottom: 1em; color: rgb(0, 0, 0); font-family: sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><input type="button" id="copy-to-clipboard" value="Copy Report to Clipboard" style="box-sizing: border-box; user-select: none; appearance: none; background-image: -webkit-linear-gradient(top, rgb(240, 240, 240), rgb(240, 240, 240) 38%, rgb(224, 224, 224)); border: 1px solid rgb(77, 144, 254); border-radius: 2px; box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 0px, rgba(255, 255, 255, 0.95) 0px 1px 2px inset; color: black; font: inherit; margin: 0px 1px 0px 0px; outline: none; text-shadow: rgb(240, 240, 240) 0px 1px 0px; min-height: 2em; min-width: 4em; padding-bottom: 2px; padding-top: 1px; padding-inline: 10px; transition: border-color 200ms ease 0s;"></div><div style="box-sizing: border-box; user-select: text; margin-bottom: 1em; color: rgb(0, 0, 0); font-family: sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><h3 style="box-sizing: border-box; user-select: text; margin-bottom: 0px; margin-top: 0px;">Graphics Feature Status</h3><ul class="feature-status-list" style="box-sizing: border-box; user-select: text; margin-bottom: 0px; margin-top: 0px;"><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Canvas:<span> </span></span><span class="feature-yellow" style="box-sizing: border-box; user-select: text; color: rgb(128, 128, 0);">Software only, hardware acceleration unavailable</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Compositing:<span> </span></span><span class="feature-yellow" style="box-sizing: border-box; user-select: text; color: rgb(128, 128, 0);">Software only. Hardware acceleration disabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Multiple Raster Threads:<span> </span></span><span class="feature-green" style="box-sizing: border-box; user-select: text; color: rgb(0, 128, 0);">Enabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Out-of-process Rasterization:<span> </span></span><span class="feature-red" style="box-sizing: border-box; user-select: text; color: rgb(255, 0, 0);">Disabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">OpenGL:<span> </span></span><span class="feature-red" style="box-sizing: border-box; user-select: text; color: rgb(255, 0, 0);">Disabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Rasterization:<span> </span></span><span class="feature-yellow" style="box-sizing: border-box; user-select: text; color: rgb(128, 128, 0);">Software only. Hardware acceleration disabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Skia Renderer:<span> </span></span><span class="feature-green" style="box-sizing: border-box; user-select: text; color: rgb(0, 128, 0);">Enabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Video Decode:<span> </span></span><span class="feature-yellow" style="box-sizing: border-box; user-select: text; color: rgb(128, 128, 0);">Software only. Hardware acceleration disabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Vulkan:<span> </span></span><span class="feature-red" style="box-sizing: border-box; user-select: text; color: rgb(255, 0, 0);">Disabled</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">WebGL:<span> </span></span><span class="feature-yellow" style="box-sizing: border-box; user-select: text; color: rgb(128, 128, 0);">Software only, hardware acceleration unavailable</span></li><li style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">WebGL2:<span> </span></span><span class="feature-yellow" style="box-sizing: border-box; user-select: text; color: rgb(128, 128, 0);">Software only, hardware acceleration unavailable</span></li></ul></div><div class="problems-div" style="box-sizing: border-box; user-select: text; margin-bottom: 1em; color: rgb(0, 0, 0); font-family: sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><h3 style="box-sizing: border-box; user-select: text; margin-bottom: 0px; margin-top: 0px;">Problems Detected</h3><ul class="problems-list" style="box-sizing: border-box; user-select: text; margin-bottom: 0px; margin-top: 0px;"><li style="box-sizing: border-box; user-select: text;"><a style="box-sizing: border-box; user-select: text;">Gpu compositing has been disabled, either via blocklist, about:flags or the command line. The browser will fall back to software compositing and hardware acceleration will be unavailable.</a><br style="box-sizing: border-box; user-select: text;"><i style="box-sizing: border-box; user-select: text;"><span style="box-sizing: border-box; user-select: text;">Disabled Features:<span> </span></span><span class="feature-red" style="box-sizing: border-box; user-select: text; color: rgb(255, 0, 0);">gpu_compositing</span></i></li></ul></div><div style="box-sizing: border-box; user-select: text; margin-bottom: 1em; color: rgb(0, 0, 0); font-family: sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><h3 style="box-sizing: border-box; user-select: text; margin-bottom: 0px; margin-top: 0px;">Version Information</h3><div id="client-info" style="box-sizing: border-box; user-select: text;"><div jstcache="0" style="box-sizing: border-box; user-select: text;">

Data exported | 2021-08-09T15:02:59.869Z
-- | --
Chrome version | Chrome/92.0.4515.131
Operating system | Windows NT 10.0.19043
Software rendering list URL | https://chromium.googlesource.com/chromium/src/+/6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29/gpu/config/software_rendering_list.json
Driver bug list URL | https://chromium.googlesource.com/chromium/src/+/6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29/gpu/config/gpu_driver_bug_list.json
ANGLE commit id | d564abe2dada
2D graphics backend | Skia/92 8e69798f33b4a4b777476dcdb7aa2c75177d07ac
Command Line | "C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe" --disable-domain-reliability --disable-features=IdleDetection,HandwritingRecognitionWebPlatformApi,FlocIdComputedEventLogging,HandwritingRecognitionWebPlatformApiFinch,TrustTokens,DirectSockets,FederatedLearningOfCohorts,AutofillEnableAccountWalletStorage,FledgeInterestGroupAPI,EnableProfilePickerOnStartup,TextFragmentAnchor,NotificationTriggers,WebOTP,SubresourceWebBundles,NetworkTimeServiceQuerying,LangClientHintHeader,SignedExchangePrefetchCacheForNavigations,AutofillServerCommunication,LiveCaption,FledgeInterestGroups,InterestCohortFeaturePolicy,InterestCohortAPIOriginTrial,FirstPartySets,SignedExchangeSubresourcePrefetch --enable-dom-distiller --enable-features=WebUIDarkMode,AutoupgradeMixedContent,SafetyTip,WinrtGeolocationImplementation,PrefetchPrivacyChanges,PasswordImport,ReducedReferrerGranularity,LegacyTLSEnforced --lso-url=https://no-thanks.invalid --no-pings --origin-trial-disabled-features=SecurePaymentConfirmation --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --sync-url=https://sync-v2.brave.com/v2 --variations-server-url=https://variations.brave.com/seed --enable-features=LegacyTLSEnforced,ReducedReferrerGranularity,PasswordImport,PrefetchPrivacyChanges,WinrtGeolocationImplementation,SafetyTip,AutoupgradeMixedContent,WebUIDarkMode --disable-features=EnablePasswordsAccountStorage,SignedExchangeSubresourcePrefetch,InterestCohortFeaturePolicy,FledgeInterestGroups,LiveCaption,AutofillServerCommunication,LangClientHintHeader,SubresourceWebBundles,NetworkTimeServiceQuerying,SignedExchangePrefetchCacheForNavigations,WebOTP,NotificationTriggers,TextFragmentAnchor,EnableProfilePickerOnStartup,AutofillEnableAccountWalletStorage,FledgeInterestGroupAPI,PrivacySandboxSettings,FederatedLearningOfCohorts,FirstPartySets,InterestCohortAPIOriginTrial,TrustTokens,DirectSockets,HandwritingRecognitionWebPlatformApi,FlocIdComputedEventLogging,HandwritingRecognitionWebPlatformApiFinch,IdleDetection --flag-switches-begin --enable-features=LegacyTLSEnforced,ReducedReferrerGranularity,PasswordImport,PrefetchPrivacyChanges,WinrtGeolocationImplementation,SafetyTip,AutoupgradeMixedContent,WebUIDarkMode,ReaderMode:discoverability/offer-in-settings --flag-switches-end

</div></div></div><div id="log-messages" jsdisplay="values.length" jstcache="1" style="box-sizing: border-box; user-select: text; margin-bottom: 1em; color: rgb(0, 0, 0); font-family: sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><h3 jstcache="0" style="box-sizing: border-box; user-select: text; margin-bottom: 0px; margin-top: 0px;">Log Messages</h3><ul jstcache="0" style="box-sizing: border-box; user-select: text; margin-bottom: 0px; margin-top: 0px;"><li jsselect="values" jstcache="2" jsinstance="0" style="box-sizing: border-box; user-select: text;"><span jscontent="header" jstcache="3" style="box-sizing: border-box; user-select: text;">[7976:38472:0809/170057.474:ERROR:gpu_init.cc(441)]<span> </span></span>:<span> </span><span jscontent="message" jstcache="4" style="box-sizing: border-box; user-select: text;">Passthrough is not supported, GL is swiftshader</span></li><li jsselect="values" jstcache="2" jsinstance="*1" style="box-sizing: border-box; user-select: text;"><span jscontent="header" jstcache="3" style="box-sizing: border-box; user-select: text;">GpuProcessHost</span>:<span> </span><span jscontent="message" jstcache="4" style="box-sizing: border-box; user-select: text;">The info collection GPU process exited normally. Everything is okay.</span></li></ul></div><!--EndFragment-->
</body>
</html>

When it comes to GPU, what both the devices I tested it with have in common is two GPUs:

Data exported 2021-08-09T15:15:49.954Z
Chrome version Chrome/92.0.4515.115
Operating system Windows NT 10.0.19043
Software rendering list URL https://chromium.googlesource.com/chromium/src/+/48cb2f4029b84b003719740a6cf9ca73f374a857/gpu/config/software_rendering_list.json
Driver bug list URL https://chromium.googlesource.com/chromium/src/+/48cb2f4029b84b003719740a6cf9ca73f374a857/gpu/config/gpu_driver_bug_list.json
ANGLE commit id 6714781d1502
2D graphics backend Skia/92 a77a4620d2fbe22ca41d1b96c1d92864c6a9ef8e
Command Line "C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe" --enable-dom-distiller --disable-domain-reliability --no-pings --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --sync-url=https://sync-v2.brave.com/v2 --lso-url=https://no-thanks.invalid --variations-server-url=https://variations.brave.com/seed --enable-features=WebUIDarkMode,LegacyTLSEnforced,AutoupgradeMixedContent,WinrtGeolocationImplementation,SafetyTip,PrefetchPrivacyChanges,PasswordImport,ReducedReferrerGranularity --disable-features=HandwritingRecognitionWebPlatformApi,FlocIdComputedEventLogging,HandwritingRecognitionWebPlatformApiFinch,LangClientHintHeader,SubresourceWebBundles,NetworkTimeServiceQuerying,NotificationTriggers,WebOTP,FledgeInterestGroups,InterestCohortFeaturePolicy,TrustTokens,DirectSockets,SignedExchangePrefetchCacheForNavigations,IdleDetection,InterestCohortAPIOriginTrial,FirstPartySets,FederatedLearningOfCohorts,AutofillEnableAccountWalletStorage,FledgeInterestGroupAPI,EnableProfilePickerOnStartup,TextFragmentAnchor,AutofillServerCommunication,LiveCaption,SignedExchangeSubresourcePrefetch --flag-switches-begin --flag-switches-end --origin-trial-disabled-features=SecurePaymentConfirmation --enable-features=ReducedReferrerGranularity,PasswordImport,PrefetchPrivacyChanges,AutoupgradeMixedContent,WinrtGeolocationImplementation,SafetyTip,LegacyTLSEnforced,WebUIDarkMode --disable-features=EnablePasswordsAccountStorage,SignedExchangeSubresourcePrefetch,LiveCaption,AutofillServerCommunication,EnableProfilePickerOnStartup,TextFragmentAnchor,AutofillEnableAccountWalletStorage,FledgeInterestGroupAPI,PrivacySandboxSettings,FederatedLearningOfCohorts,FirstPartySets,InterestCohortAPIOriginTrial,IdleDetection,TrustTokens,DirectSockets,InterestCohortFeaturePolicy,FledgeInterestGroups,WebOTP,NotificationTriggers,LangClientHintHeader,SubresourceWebBundles,NetworkTimeServiceQuerying,SignedExchangePrefetchCacheForNavigations,HandwritingRecognitionWebPlatformApi,FlocIdComputedEventLogging,HandwritingRecognitionWebPlatformApiFinch --flag-switches-begin --flag-switches-end

Log Messages



Probably related to that?