Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Issue 2057143003: Increase PDF display timeouts (Closed)

Created:
4 years, 6 months ago by brucedawson
Modified:
4 years, 6 months ago
Reviewers:
Lei Zhang, jam
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Increase PDF display timeouts On moderately to very complex PDFs it can take more than 10 ms to render the page, especially when scrolling. This means that rendering hits the kMaxInitialProgressivePaintTimeMs timeout and is terminated without any pixels going to the screen. This means that (other than scrollbar movement) the user gets *zero* visual feedback until the mouse/mouse-wheel/key-presses slow down enough to get a fast-frame in. This change increases the timeouts. Any PDFs that can render their scrolled image in less than the timeout will now be continuously updated. Because the painting is in a separate process from the renderer and scrollbars there is little downside to increasing the timeout. The only downside is a slight increase in the latency of rendering the final frame when the user stops scrolling a complex PDF. For complex/expensive PDFs the typical increase in latency will be half of the floor of the PDF render time and the timeout, so about 125 ms for complex/expensive PDFs. For trivial PDFs the increased timeout will make no difference. On the test pages from the four attached bugs the improvement is dramatic. Scrolling is sometimes slow, but frames continue being delivered without the user having to pause and wait for Chrome to catch up. Improving the performance of decoding and scaling images, or doing the decoding and/or scaling asynchronously while still displaying scrolling PDF imagery, is left for a future bug. This fix is necessary for future improvements but does not make other improvements unnecessary. BUG=318175, 582752, 617365, 619117 Committed: https://crrev.com/60e37416d6640d90cc6942b361d36cb77531174f Cr-Commit-Position: refs/heads/master@{#401660}

Patch Set 1 #

Patch Set 2 : Remove all Pause_NeedToPauseNow code #

Patch Set 3 : Set timeouts to 200 and 100 #

Patch Set 4 : Tweaking comment and values #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -10 lines) Patch
M pdf/pdfium/pdfium_engine.cc View 1 2 3 1 chunk +12 lines, -10 lines 0 comments Download

Messages

Total messages: 22 (8 generated)
brucedawson
PTAL? Improving the image decoding is a follow-up task that I'm working on, but getting ...
4 years, 6 months ago (2016-06-18 00:34:40 UTC) #3
jam
On 2016/06/18 00:34:40, brucedawson wrote: > PTAL? > > Improving the image decoding is a ...
4 years, 6 months ago (2016-06-20 16:55:30 UTC) #5
brucedawson
Thanks for the example PDF. I'll add that to my list of torture tests. The ...
4 years, 6 months ago (2016-06-20 17:38:23 UTC) #6
jam
On 2016/06/20 17:38:23, brucedawson wrote: > Thanks for the example PDF. I'll add that to ...
4 years, 6 months ago (2016-06-20 18:12:21 UTC) #7
jam
lgtm per offline thread since 1) the renderer isn't hung since this is occurring in ...
4 years, 6 months ago (2016-06-22 22:44:01 UTC) #10
jam
btw I don't think all the referenced bugs are fixed by this change, so IMO ...
4 years, 6 months ago (2016-06-22 22:55:45 UTC) #11
jam
On 2016/06/22 22:55:45, jam wrote: > btw I don't think all the referenced bugs are ...
4 years, 6 months ago (2016-06-22 23:00:58 UTC) #12
brucedawson
On 2016/06/22 23:00:58, jam wrote: > On 2016/06/22 22:55:45, jam wrote: > > btw I ...
4 years, 6 months ago (2016-06-22 23:32:50 UTC) #13
jam
On 2016/06/22 23:32:50, brucedawson wrote: > On 2016/06/22 23:00:58, jam wrote: > > On 2016/06/22 ...
4 years, 6 months ago (2016-06-23 15:53:21 UTC) #14
brucedawson
> (per comment 12) I couldn't repro an improvement in a 4 core VM for ...
4 years, 6 months ago (2016-06-23 16:47:03 UTC) #15
brucedawson
> Do you see smooth scrolling in all cases, or in none? I did further ...
4 years, 6 months ago (2016-06-23 18:33:21 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2057143003/60001
4 years, 6 months ago (2016-06-23 18:34:19 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-23 18:41:08 UTC) #20
commit-bot: I haz the power
4 years, 6 months ago (2016-06-23 18:51:33 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/60e37416d6640d90cc6942b361d36cb77531174f
Cr-Commit-Position: refs/heads/master@{#401660}

Powered by Google App Engine
This is Rietveld 408576698