New issue
Advanced search Search tips

Issue 613704 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Some large PDFs take practically forever to load

Project Member Reported by jwer...@chromium.org, May 20 2016

Issue description

Version: 50.0.2661.79 beta
OS: 7978.57.0 (Official Build) beta-channel veyron_minnie
(Also observed on 7978.48.0 already)

What steps will reproduce the problem?
(1) Try to open a sufficiently large PDF (example: https://drive.google.com/a/google.com/file/d/0Bz_cehT3Y6YsS08wNXpGcEdGMWM/view?usp=sharing or https://drive.google.com/a/google.com/file/d/0Bz_cehT3Y6YsRkt0RDFqNWh5dGM/view?usp=sharing )

What is the expected output?

I see the PDF's contents before the heat death of the universe

What do you see instead?

A gray screen with only a scroll bar, and "Plugin: Chrome PDF Viewer" spinning at 100% CPU in task manager for *several minutes* before finally displaying the document (during which time all other PDFs I have open are frozen).

Please use labels and text to provide additional information.

I have been reading these same PDFs on Chromebooks regularly for years, and they have never taken more than a few seconds to load. This is a serious regression that makes working with affected documents practically unusable (it took me a while to accidentally figure out that they aren't totally hung). I don't think this should hit stable like that...

I can reproduce the problem in guest mode with no extensions or other tabs open.
 
Labels: OS-Chrome
Labels: -M-50 M-51 OS-Linux OS-Mac OS-Windows
M50 is an unrealistic minestone, as it has been stable channel for a month already and is towards the end of its life cycle.

Comment 3 by gov...@chromium.org, May 20 2016

We're very close to M51 Stable launch. pls make sure to land the fix and get it merged ASAP. All changes MUST be merged into the release branch by 5pm on May 23, Monday to make into the desktop Stable final build cut.
Cc: -thestig@chromium.org
Owner: thestig@chromium.org
Status: Assigned (was: Untriaged)
Even M51 is a bit tight. We'll see what I can get done on a Friday afternoon.
Labels: -M-51 M-52
So this regressed in r372415. The first sample PDF is linearized, so we should use the linearized loading path. However, that path, for a 2500+ page PDF, takes forever. I'll look into it, but I don't think we'll make M51.
Hmm, M52 actually branched last Friday. I think we can make some improvements here and merge them to M51. A good public test case is the PDF 1.7 spec PDF file. It's similar to the test documents here in that it's linearized and contains many many pages.
Actually, the first private test document performs worse than the PDF spec file. It takes a long time even in an official release build, whereas the PDF spec file actually loads pretty fast. OTOH, I've been testing with my debug builds where even the PDF spec file is slow.
Cc: weili@chromium.org
With a release build on my workstation, https://codereview.chromium.org/2006793003 takes the loading time from 27 seconds to 2.5.
Status: Started (was: Assigned)
The main issue is the Chrome PDF viewer not reading the hints table from the PDF. My CL fixes that. A secondary issue is that performance is very poor when the hint table is missing. I filed https://bugs.chromium.org/p/pdfium/issues/detail?id=500 for that issue.
Cc: ligim...@chromium.org
Can we have a latest update on this issue?
It would be great to have a fix before next M52-beta release (Build cut on Monday 06/06).
ping to thestig@
I haven't finished the fix yet. Spent a few days out of office.
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0968faa3214a03bc763d15fd66943ff3bcaf75d5

commit 0968faa3214a03bc763d15fd66943ff3bcaf75d5
Author: thestig <thestig@chromium.org>
Date: Thu Jun 16 23:05:43 2016

PDF: Always call FPDFAvail_IsDocAvail() when loading.

BUG= 613704 

Review-Url: https://codereview.chromium.org/2006793003
Cr-Commit-Position: refs/heads/master@{#400286}

[modify] https://crrev.com/0968faa3214a03bc763d15fd66943ff3bcaf75d5/pdf/pdfium/pdfium_engine.cc
[modify] https://crrev.com/0968faa3214a03bc763d15fd66943ff3bcaf75d5/pdf/pdfium/pdfium_engine.h

A friendly reminder that M52 Stable is launching soon! Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and get it merged into the release branch by July 12. All changes MUST be merged into the release branch by 5pm on July 15 to make into the desktop Stable final build cut. Thank you!
Please try 53.0.2770.0 or newer on Canary or maybe Dev channel and make sure the PDFs load faster.
Labels: Merge-Request-52
I tested Canary vs Stable on a Windows machine with the doc in the first link. Performance was ~3 seconds vs ~30 seconds load time.

Comment 17 by tin...@google.com, Jun 20 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Status: Fixed (was: Started)
Will merge soon.
Project Member

Comment 19 by bugdroid1@chromium.org, Jun 20 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d7d4d710ba90e41bc9295e87a63db57f093bd3ad

commit d7d4d710ba90e41bc9295e87a63db57f093bd3ad
Author: Lei Zhang <thestig@chromium.org>
Date: Mon Jun 20 17:56:51 2016

M52: PDF: Always call FPDFAvail_IsDocAvail() when loading.

BUG= 613704 

Review-Url: https://codereview.chromium.org/2006793003
Cr-Commit-Position: refs/heads/master@{#400286}
(cherry picked from commit 0968faa3214a03bc763d15fd66943ff3bcaf75d5)

Review URL: https://codereview.chromium.org/2080313003 .

Cr-Commit-Position: refs/branch-heads/2743@{#406}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/d7d4d710ba90e41bc9295e87a63db57f093bd3ad/pdf/pdfium/pdfium_engine.cc
[modify] https://crrev.com/d7d4d710ba90e41bc9295e87a63db57f093bd3ad/pdf/pdfium/pdfium_engine.h

Thank you thestig@ for merging the fix in to M52 branch quickly.
Status: Verified (was: Fixed)
After the update to 53.0.2773.0 my PDFs load fast again. Thanks!

Sign in to add a comment