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

Issue 1506023002: Minimize the number of range requests made by PDFium (Closed)

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

Description

Minimize the number of range requests made by PDFium Previously, Chrome would make a series of range requests for linearized PDFs, starting at 32 KB and slowly increasing. On high latency connections, this is considerably slower than using a single request. Now Chrome will make range requests as large as possible and cancel them if the renderer needs some data in a different place in the document. This significantly reduces the number of range requests performed by Chrome. BUG=460201, 78264 Committed: https://crrev.com/3ba2a28104c4d6feef3efd71d9be73f085886f53 Cr-Commit-Position: refs/heads/master@{#364235}

Patch Set 1 #

Patch Set 2 : DidOpen is never cancelled #

Total comments: 22

Patch Set 3 : Cleanup and don't partially render full documents #

Total comments: 21

Patch Set 4 : Cleanup #

Total comments: 2

Patch Set 5 : delint #

Patch Set 6 : Fix issue with chunk_stream #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -125 lines) Patch
M pdf/chunk_stream.h View 1 2 3 4 5 2 chunks +8 lines, -3 lines 0 comments Download
M pdf/chunk_stream.cc View 1 2 3 4 5 4 chunks +8 lines, -6 lines 0 comments Download
M pdf/document_loader.h View 1 2 3 4 4 chunks +24 lines, -4 lines 0 comments Download
M pdf/document_loader.cc View 1 2 3 4 5 7 chunks +110 lines, -112 lines 0 comments Download

Messages

Total messages: 42 (14 generated)
jab
great work-in-progress https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc File pdf/document_loader.cc (right): https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc#newcode219 pdf/document_loader.cc:219: // Remove all elements except the first ...
5 years ago (2015-12-08 02:52:41 UTC) #3
spelchat
https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc File pdf/document_loader.cc (right): https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc#newcode219 pdf/document_loader.cc:219: // Remove all elements except the first one. On ...
5 years ago (2015-12-08 17:51:48 UTC) #4
jab
Looks good to me. I probably don't have enough authority to provide an official LGTM
5 years ago (2015-12-08 18:32:03 UTC) #5
jab
https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc File pdf/document_loader.cc (right): https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc#newcode497 pdf/document_loader.cc:497: } else if (result == PP_OK || result == ...
5 years ago (2015-12-08 18:32:23 UTC) #7
spelchat
https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc File pdf/document_loader.cc (right): https://codereview.chromium.org/1506023002/diff/20001/pdf/document_loader.cc#newcode497 pdf/document_loader.cc:497: } else if (result == PP_OK || result == ...
5 years ago (2015-12-08 18:48:55 UTC) #10
Lei Zhang
On 2015/12/08 18:48:55, spelchat wrote: > crbug/460201 is restricted, so I suppose we can't refer ...
5 years ago (2015-12-08 19:21:57 UTC) #11
Lei Zhang
Just nit picking. Are there any potential integer underflows in the calculations? https://codereview.chromium.org/1506023002/diff/40001/pdf/document_loader.cc File pdf/document_loader.cc ...
5 years ago (2015-12-08 19:32:23 UTC) #12
spelchat
On 2015/12/08 19:21:57, Lei Zhang wrote: > On 2015/12/08 18:48:55, spelchat wrote: > > crbug/460201 ...
5 years ago (2015-12-08 19:35:03 UTC) #13
Lei Zhang
On 2015/12/08 19:35:03, spelchat wrote: > On 2015/12/08 19:21:57, Lei Zhang wrote: > > On ...
5 years ago (2015-12-08 19:42:29 UTC) #14
spelchat
I checked again for underflows, everything seems good. https://codereview.chromium.org/1506023002/diff/40001/pdf/document_loader.cc File pdf/document_loader.cc (right): https://codereview.chromium.org/1506023002/diff/40001/pdf/document_loader.cc#newcode180 pdf/document_loader.cc:180: // ...
5 years ago (2015-12-08 22:01:46 UTC) #15
Lei Zhang
lgtm I'm not familiar with the code, but if you two have been poking at ...
5 years ago (2015-12-08 22:40:09 UTC) #17
Lei Zhang
re: nits - basically you should run "git cl lint" and not make me do ...
5 years ago (2015-12-08 22:43:20 UTC) #18
spelchat
On 2015/12/08 22:43:20, Lei Zhang wrote: > re: nits - basically you should run "git ...
5 years ago (2015-12-08 22:50:02 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506023002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506023002/80001
5 years ago (2015-12-08 22:54:55 UTC) #22
jab
I patched this in, instrumented the range requests, hit reload a few times, fiddled with ...
5 years ago (2015-12-09 01:26:32 UTC) #23
jab
1) Start loading PDF #1 2) Midway through load, switch to PDF #2. Expected: immediate ...
5 years ago (2015-12-09 01:41:31 UTC) #24
jab
I can confirm that PDFium is not asking for the 0 size request. This is ...
5 years ago (2015-12-09 01:50:55 UTC) #25
spelchat
On 2015/12/09 01:50:55, jab wrote: > I can confirm that PDFium is not asking for ...
5 years ago (2015-12-09 17:07:09 UTC) #28
jab
Patched in "if (first_byte_after < pos + size)". Took me about 25+ tries, but I ...
5 years ago (2015-12-09 19:29:09 UTC) #29
spelchat
On 2015/12/09 17:07:09, spelchat wrote: > On 2015/12/09 01:50:55, jab wrote: > > I can ...
5 years ago (2015-12-09 19:34:38 UTC) #30
jab
> I managed to reproduce #23 and #25, but not #24. What URL are you ...
5 years ago (2015-12-09 19:43:39 UTC) #31
jab
Easy to reproduce. No scrolling required. Screenshot heading to your inbox.
5 years ago (2015-12-09 19:54:47 UTC) #32
spelchat
On 2015/12/09 19:54:47, jab wrote: > Easy to reproduce. No scrolling required. Screenshot heading to ...
5 years ago (2015-12-09 20:45:36 UTC) #33
jab
Yes, probably a side effect from asked the local webserver to throttle itself. Okay, then ...
5 years ago (2015-12-09 21:22:17 UTC) #34
spelchat
On 2015/12/09 21:22:17, jab wrote: > Yes, probably a side effect from asked the local ...
5 years ago (2015-12-09 22:35:20 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506023002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506023002/100001
5 years ago (2015-12-09 23:30:43 UTC) #38
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years ago (2015-12-10 00:44:25 UTC) #40
commit-bot: I haz the power
5 years ago (2015-12-10 00:45:24 UTC) #42
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3ba2a28104c4d6feef3efd71d9be73f085886f53
Cr-Commit-Position: refs/heads/master@{#364235}

Powered by Google App Engine
This is Rietveld 408576698