-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webengine backend with smooth scrolling enabled is jittery while scrolling #2233
Comments
Hmm, I find on The example webpage is still jittery when scrolling however. Update: Hiding the statusbar too completely eliminates all scroll-jittering on all webpages for me. |
You mentioned seeing the same in QupZilla, so closing this as a QtWebEngine issue. |
I know that this issue is closed but I just noticed that when I do |
Actually. That tab show never/always was just a coincidence. I can reliably get the scrolling to be non-jerky responsive by doing this:
|
Sure. Just tried, QupZilla seems to work fine when using the arrow keys. Though I have to also mention that Qutebrowser also works fine when I use the arrow keys, it is only laggy and jerky when using j/k. Also: After |
That's weird... All |
I can observe this too. No difference between arrow keys / j/k / mouse scrolling from what I can tell. Intel HD Graphics 4600 Ping @pkill-nine Edit: I wouldn't call the framed version butter smooth, but definitely smoother. |
Interesting, for me a page spawned from right-clicking a page and clicking "View Page Source" is completely smooth. If I run |
@pkill-nine Those are two different source views (Chromium's vs. qutebrowser's one generated with pygments) |
As tests here seem to be inconclusive and this happens outside of qutebrowser as well, I'm closing this. |
With either tabs or the status bar visible (or both), I'm getting jumpy scrolling despite On both platforms, with both the tabs and status bar invisible, scrolling is buttery-smooth. On OS X, QupZilla scrolls smoothly for me (though it has that slow-scrolling Qt bug fixed in 5.9; didn't test QupZilla on Windows, but I could if it helps anyone). |
#2822 might help - if not, I doubt there's anything qutebrowser can do. |
Turns out this happens due to QtWebEngine emitting a This should probably help already, but I'd like someone with those problems to test it: diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py
index 4de4bf26f..09df38e82 100644
--- a/qutebrowser/browser/webengine/webenginetab.py
+++ b/qutebrowser/browser/webengine/webenginetab.py
@@ -333,9 +333,10 @@ class WebEngineScroller(browsertab.AbstractScroller):
perc_y = min(100, round(100 / dy * jsret['px']['y']))
self._at_bottom = math.ceil(jsret['px']['y']) >= dy
- self._pos_perc = perc_x, perc_y
- self.perc_changed.emit(*self._pos_perc)
+ if self._pos_perc != (perc_x, perc_y):
+ self._pos_perc = perc_x, perc_y
+ self.perc_changed.emit(*self._pos_perc)
js_code = javascript.assemble('scroll', 'pos')
self._tab.run_js_async(js_code, update_pos_cb) Maybe some more optimizations are needed though. |
QtWebEngine emits scrollPositionChanged a lot during smooth scrolling, and there's no reason we need to update percentages when they didn't *actually* change. This reduces the updates with a single spacebar press from 6-7 to 2-3 on my machine, which might not be enough though. See #2233
QtWebEngine emits scrollPositionChanged a lot during smooth scrolling, and there's no reason we need to update percentages when they didn't *actually* change. This reduces the updates with a single spacebar press from 6-7 to 2-3 on my machine, which might not be enough though. See #2233 (cherry picked from commit 1d50c2c)
I pushed that now - I'd still be glad if someone could check the difference between |
I've had to revert this as it breaks various tests relying on it. I'll need to take a closer look first. |
FWIW, with that patch I am indeed seeing significantly smoother smooth scrolling when the tabs and/or the status bar are visible. It's not quite as smooth as it is without the UI bars visible, but it's definitely better than before. |
This way, if {scroll_pos} is not in the window/tab title template, we don't redraw anything unnecessarily. See #2233
I've now pushed various improvements (hopefully) for this to the latest master. Can someone check how things are now? |
I'm using qutebrowser-git from the AUR and it appears to be much better, but still not as great as something like VimFX or Vimium. Here's a 60fps video of qutebrowser on the left, and Firefox 57+Vimium on the right (though in hindsight I think it would have been more meaningful to use chromium instead). I should note that these are all scrolled with j/k, not the mouse. The mouse exhibits similar symptoms |
On OS X El Capitan I see similar results on that same bootstrap site. On sites like Wikipedia, however (video attached, with comparisons to Firefox and Chrome), qutebrowser seems to scroll more smoothly (well, at least usually -- e.g., the final scroll in my attached video is a bit choppy). |
https://codereview.qt-project.org/#/c/209352/ might also help here - I don't think there's much more qutebrowser can do, so I'm closing this. |
I posted this issue on the Qt bug tracker.
qutebrowser v0.9.0
Git commit: v0.8.0-2066-g282180e76 (2017-01-08 00:21:57 +0000)
Backend: Webengine
To replicate:
Open Qutebrowser with
--backend webengine
Enable smooth scrolling (
:set ui smooth-scrolling true
)Scrolling this example webpage will be very jittery and not smooth at all.
However, if that webpage is within a html frame, then scrolling the page is very smooth.
The text was updated successfully, but these errors were encountered: