New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769812 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 25 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Loading large linearized PDF is slow

Project Member Reported by hnakashima@chromium.org, Sep 28 2017

Issue description

1. Open http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf

Expected: first page loads quickly (~1s)
Actual: first page takes long to load (~10s)

Culprint found with bisect: https://chromium-review.googlesource.com/c/chromium/src/+/676201 (Convert std::deque to base::circular_deque.)

This bug is similar to  https://crbug.com/755061  though the loading bar is not affected, showing correctly during the long load time. Reverting the CL that caused that bug (https://chromium-review.googlesource.com/c/chromium/src/+/615302) ALSO fixes this bug.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 28 2017

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

commit 4cc7142f773d01c9d0e5c7ac1eba62a7c6bbbd10
Author: Brett Wilson <brettw@chromium.org>
Date: Thu Sep 28 23:17:20 2017

Fix optimized erasing from the beginning of a circular_deque.

Previously the boundary check was incorrect when detecting items
were being deleted from the front of a circular_deque. This caused
it to fall through to the slow case where all items were shifted
over, breaking the promise of amoritized O(1) time.

Since this is an optimization (the existing code was correct, just
slower than necessary), there are no unit tests for this.

Bug:  769812 
Change-Id: I8d78be8185741baaca5f2e36413f615102fd68db
Reviewed-on: https://chromium-review.googlesource.com/690976
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505205}
[modify] https://crrev.com/4cc7142f773d01c9d0e5c7ac1eba62a7c6bbbd10/base/containers/circular_deque.h

Comment 2 by brettw@chromium.org, Sep 29 2017

Status: Fixed (was: Untriaged)

Sign in to add a comment