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

Issue 918953002: Fix for PDFs with lots of named destinations take a long time to load. (Closed)

Created:
5 years, 10 months ago by Deepak
Modified:
5 years, 10 months ago
Reviewers:
Sam McNally, raymes
CC:
chromium-reviews, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix for PDFs with lots of named destinations take a long time to load. When PDF have lots of named destinations then as we are fetching all the named destinations at load time, so this will increase loading time. This is a workaround so that we will get named destination whenever it is required by passing message from page to plugin. BUG=457457 Committed: https://crrev.com/9cdcfdfdb5fd39249669a5743f39d739fe05b47a Cr-Commit-Position: refs/heads/master@{#316685}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Changes with new approach. #

Total comments: 36

Patch Set 3 : Changes as per review comments. #

Patch Set 4 : Adding comments. #

Patch Set 5 : Addressing nit #

Total comments: 8

Patch Set 6 : Changes as per review comments. #

Patch Set 7 : Changes as per review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -127 lines) Patch
M chrome/browser/resources/pdf/navigator.js View 1 2 3 4 5 1 chunk +16 lines, -6 lines 0 comments Download
M chrome/browser/resources/pdf/open_pdf_params_parser.js View 1 2 3 4 5 6 4 chunks +43 lines, -19 lines 0 comments Download
M chrome/browser/resources/pdf/pdf.js View 1 2 3 4 5 5 chunks +42 lines, -20 lines 0 comments Download
M chrome/test/data/pdf/navigator_test.js View 1 2 3 4 5 1 chunk +8 lines, -3 lines 0 comments Download
M chrome/test/data/pdf/params_parser_test.js View 1 2 3 4 5 1 chunk +56 lines, -39 lines 0 comments Download
M pdf/out_of_process_instance.cc View 1 2 3 4 5 3 chunks +15 lines, -11 lines 0 comments Download
M pdf/pdf_engine.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M pdf/pdfium/pdfium_engine.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M pdf/pdfium/pdfium_engine.cc View 1 2 1 chunk +0 lines, -27 lines 0 comments Download

Messages

Total messages: 16 (3 generated)
Deepak
PTAL and share your thoughts. I will update test cases for this, Once this approach ...
5 years, 10 months ago (2015-02-12 07:32:53 UTC) #2
raymes
https://codereview.chromium.org/918953002/diff/1/chrome/browser/resources/pdf/navigator.js File chrome/browser/resources/pdf/navigator.js (left): https://codereview.chromium.org/918953002/diff/1/chrome/browser/resources/pdf/navigator.js#oldcode83 chrome/browser/resources/pdf/navigator.js:83: } None of this should be removed. Instead the ...
5 years, 10 months ago (2015-02-12 22:19:05 UTC) #3
Deepak
Thanks for sharing your view. I understood your approach & tried it. But facing 3 ...
5 years, 10 months ago (2015-02-13 14:59:29 UTC) #4
Deepak
@Raymes Changes done as suggested. It is working as expected. PTAL. Thanks
5 years, 10 months ago (2015-02-14 10:23:43 UTC) #5
raymes
Thanks! https://codereview.chromium.org/918953002/diff/20001/chrome/browser/resources/pdf/navigator.js File chrome/browser/resources/pdf/navigator.js (right): https://codereview.chromium.org/918953002/diff/20001/chrome/browser/resources/pdf/navigator.js#newcode78 chrome/browser/resources/pdf/navigator.js:78: url, function(initialViewport) { nit: initialViewport->viewportPosition nit: could you ...
5 years, 10 months ago (2015-02-16 02:02:31 UTC) #6
Deepak
Thanks for review. PTAL. https://codereview.chromium.org/918953002/diff/20001/chrome/browser/resources/pdf/navigator.js File chrome/browser/resources/pdf/navigator.js (right): https://codereview.chromium.org/918953002/diff/20001/chrome/browser/resources/pdf/navigator.js#newcode78 chrome/browser/resources/pdf/navigator.js:78: url, function(initialViewport) { On 2015/02/16 ...
5 years, 10 months ago (2015-02-16 06:45:38 UTC) #7
raymes
Thanks! https://codereview.chromium.org/918953002/diff/20001/chrome/browser/resources/pdf/open_pdf_params_parser.js File chrome/browser/resources/pdf/open_pdf_params_parser.js (right): https://codereview.chromium.org/918953002/diff/20001/chrome/browser/resources/pdf/open_pdf_params_parser.js#newcode74 chrome/browser/resources/pdf/open_pdf_params_parser.js:74: viewportPosition['page'] = this.namedDestinations[paramTokens[0]]; I still don't think I ...
5 years, 10 months ago (2015-02-16 22:44:04 UTC) #8
raymes
Hi Deepak - in the interest of time I have uploaded the CL with changes ...
5 years, 10 months ago (2015-02-17 02:19:23 UTC) #9
Deepak
Thanks for review. Changes done as suggested. PTAL https://codereview.chromium.org/918953002/diff/80001/chrome/browser/resources/pdf/navigator.js File chrome/browser/resources/pdf/navigator.js (right): https://codereview.chromium.org/918953002/diff/80001/chrome/browser/resources/pdf/navigator.js#newcode77 chrome/browser/resources/pdf/navigator.js:77: this.onViewportReceived_(url); ...
5 years, 10 months ago (2015-02-17 07:12:12 UTC) #11
raymes
On 2015/02/17 07:12:12, Deepak wrote: > Thanks for review. > Changes done as suggested. > ...
5 years, 10 months ago (2015-02-17 22:42:17 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918953002/120001
5 years, 10 months ago (2015-02-17 22:43:20 UTC) #14
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 10 months ago (2015-02-17 22:47:50 UTC) #15
commit-bot: I haz the power
5 years, 10 months ago (2015-02-17 22:48:20 UTC) #16
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9cdcfdfdb5fd39249669a5743f39d739fe05b47a
Cr-Commit-Position: refs/heads/master@{#316685}

Powered by Google App Engine
This is Rietveld 408576698