Browser-laptop: content doesn't fill fast enough when you resize a browser window horizontally

Created on 3 Feb 2016  路  21Comments  路  Source: brave/browser-laptop

Load a site like slashdot.org. Not too complex. Resize the window horizontally and notice the content doesn't fill in very quickly. It's very easy on Mac and Windows, even on relatively new equipment, to outrace the content leaving a blank area before the content races to catch up with the window edge. It feels very janky, laggy, bad. Video attached.

refill.mov.zip

also on youtube https://youtu.be/gnE1--66q-I

bug fixed-with-brave-core initiativperf perf prioritP5 wontfix

Most helpful comment

FYI, resizing performance for webviews can be improved quite a bit with electron/electron#7658 (cc @bridiver, @bsclifton).

All 21 comments

Just noting for now, a big part of this is that there's an app state change that happens on resize here js/stores/appStore.js:

  mainWindow.on('resize', function (evt) {
    // the default window size is whatever the last window resize was
    AppActions.setDefaultWindowSize(evt.sender.getSize())
  })

That triggers the app state to be communicated to the window over IPC. We should look to minimize app state transfer for things that only matter to the app itself, like the default window position size.

Several UI snappy fixes in 0.7.14.
This is improved with 0.7.14 but not good enough to close this yet.

Much of this is due to <webview> being slow to resize. See https://bugs.chromium.org/p/chromium/issues/detail?id=639867

@bbondy @bridiver Have you considered patching libchromiumcontent to fix or work around this?

right now it's low on the priority list, but at some point after 1.0 we'll take a closer look. I dug through the code a little bit and it's certainly not a trivial fix

FYI, resizing performance for webviews can be improved quite a bit with electron/electron#7658 (cc @bridiver, @bsclifton).

I'll take a look. Thanks!

lgtm! I'll cherry-pick it when I'm done with the chromium 54 update

@bridiver nice :smile: I created https://github.com/brave/electron/issues/78 for ya

If you get a sec, check out the fix I did event-wise in https://github.com/brave/browser-laptop/pull/5102

was #5102 supposed to close this?

@bridiver yes- the performance is noticeably better :smile:

ok, but I assume we still want to pull in the upstream change?

@bridiver yup! and that is captured with https://github.com/brave/electron/issues/78

Content doesn't fill up until the window is moved to a certain length (Visible on slashdot.org site, doesn't fill until its stopped)

586

Sorry this was mistakenly closed, it's more about content not filling in the resizing window fast enough.

With https://github.com/brave/electron/issues/78 closed, we should retest this starting with 0.13.0 :smile:

If it's not fixed, let's remove the milestone and leave some notes here

it was closed because the patch no longer applied, but I have no idea if the behavior has changed or not

Gave it a go, performance didn't seem any better. Was worth a shot :smile: Removing milestone

a similar change may or may not work for the chromium webview

This was getting better through 0.12.5 and now became worse again with 0.13.0 based on my personal mac OS experience.

@bradleyrichter in 0.13 we switched from the electron webview to the chrome webview and that may have had an impact because the resizing code is different

This issue will be solved when we move to the Chromium UI (Brave Core)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stevespringett picture stevespringett  路  3Comments

mykkymk picture mykkymk  路  3Comments

jonathansampson picture jonathansampson  路  3Comments

luixxiul picture luixxiul  路  3Comments

shortstuffsushi picture shortstuffsushi  路  3Comments