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

Issue 2455403002: Reland of Improve linearized pdf load/show time. (Closed)

Created:
4 years, 1 month ago by snake
Modified:
4 years ago
Reviewers:
Robert Sesek, Lei Zhang
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of Improve linearized pdf load/show time. Original issue's description: > Improve linearized pdf load/show time. > Reduce Pdf Plugin's count of reconnects. > Add tests for PDFPlugin DocumentLoader. > > DocumentLoader was splitted into separate components, and missing tests was added for them. > > The main ideas in this CL are: > > 1) Do not reset browser initiated connection at start (includes case when we can use range requests), if we request data near current downloading position. > 2) Request as much data as we can on each request, and continue loading data using current range request. (like tape rewind) > 3) Isolate RangeRequest logic into DocumentLoader. Method OnPendingRequestComplete is called, when we receive requested data (main connection, or Range connection). (like tape playing without rewing). > 4) Fill this logic by tests. > > Example URL: > http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf > Comparison of changes: > https://drive.google.com/file/d/0BzWfMBOuik2QNGg0SG93Y3lpUlE/view?usp=sharing > > Committed: https://crrev.com/7fd7423cdee0dba84faf480d10dd66dcb57110d9 > Cr-Commit-Position: refs/heads/master@{#427752} Original review: https://codereview.chromium.org/2349753003/ Committed: https://crrev.com/3704ccf02007dd912933abc3f3006159171bc41b Cr-Commit-Position: refs/heads/master@{#429514}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Try to fix compilation. #

Patch Set 3 : Fix memory leaks #

Patch Set 4 : Fix memory leaks #

Total comments: 4

Patch Set 5 : Fix review issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2929 lines, -746 lines) Patch
M pdf/BUILD.gn View 1 4 chunks +11 lines, -1 line 0 comments Download
M pdf/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M pdf/chunk_stream.h View 1 chunk +80 lines, -23 lines 0 comments Download
D pdf/chunk_stream.cc View 1 chunk +0 lines, -175 lines 0 comments Download
M pdf/chunk_stream_unittest.cc View 1 chunk +86 lines, -4 lines 0 comments Download
M pdf/document_loader.h View 3 chunks +46 lines, -62 lines 0 comments Download
M pdf/document_loader.cc View 4 chunks +240 lines, -394 lines 0 comments Download
A pdf/document_loader_unittest.cc View 1 2 3 4 1 chunk +1179 lines, -0 lines 0 comments Download
M pdf/out_of_process_instance.h View 1 chunk +1 line, -0 lines 0 comments Download
M pdf/out_of_process_instance.cc View 2 chunks +6 lines, -9 lines 0 comments Download
M pdf/pdf_engine.h View 2 chunks +3 lines, -2 lines 0 comments Download
M pdf/pdfium/pdfium_engine.h View 4 chunks +11 lines, -6 lines 0 comments Download
M pdf/pdfium/pdfium_engine.cc View 15 chunks +87 lines, -70 lines 0 comments Download
M pdf/preview_mode_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M pdf/preview_mode_client.cc View 1 chunk +2 lines, -0 lines 0 comments Download
A pdf/range_set.h View 1 chunk +77 lines, -0 lines 0 comments Download
A pdf/range_set.cc View 1 chunk +253 lines, -0 lines 0 comments Download
A pdf/range_set_unittest.cc View 1 chunk +303 lines, -0 lines 0 comments Download
A pdf/timer.h View 1 chunk +35 lines, -0 lines 0 comments Download
A pdf/timer.cc View 1 chunk +31 lines, -0 lines 0 comments Download
A pdf/url_loader_wrapper.h View 1 chunk +62 lines, -0 lines 0 comments Download
A pdf/url_loader_wrapper_impl.h View 1 chunk +89 lines, -0 lines 0 comments Download
A pdf/url_loader_wrapper_impl.cc View 1 2 3 4 1 chunk +325 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (24 generated)
snake
4 years, 1 month ago (2016-10-28 13:18:21 UTC) #3
snake
On 2016/10/28 13:18:21, snake wrote: ping?
4 years, 1 month ago (2016-10-31 17:12:26 UTC) #4
Lei Zhang
Now that the trybots are building pdf_unittests, they are showing linking errors. https://codereview.chromium.org/2455403002/diff/1/pdf/BUILD.gn File pdf/BUILD.gn ...
4 years, 1 month ago (2016-10-31 18:52:34 UTC) #9
snake
https://codereview.chromium.org/2455403002/diff/1/pdf/BUILD.gn File pdf/BUILD.gn (right): https://codereview.chromium.org/2455403002/diff/1/pdf/BUILD.gn#newcode50 pdf/BUILD.gn:50: # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. On ...
4 years, 1 month ago (2016-10-31 19:08:28 UTC) #10
Lei Zhang
I started another CQ dry run. Hope it turns green.
4 years, 1 month ago (2016-10-31 19:20:56 UTC) #13
Lei Zhang
The ASAN but, which also runs LSAN, is complaining about memory leaks.
4 years, 1 month ago (2016-10-31 21:57:31 UTC) #14
Lei Zhang
On 2016/10/31 21:57:31, Lei Zhang wrote: > The ASAN but, which also runs LSAN, is ...
4 years, 1 month ago (2016-10-31 21:57:40 UTC) #15
snake
On 2016/10/31 21:57:40, Lei Zhang wrote: > On 2016/10/31 21:57:31, Lei Zhang wrote: > > ...
4 years, 1 month ago (2016-11-01 12:33:41 UTC) #18
Lei Zhang
On 2016/11/01 12:33:41, snake wrote: > On 2016/10/31 21:57:40, Lei Zhang wrote: > > On ...
4 years, 1 month ago (2016-11-01 20:52:43 UTC) #23
snake
On 2016/11/01 20:52:43, Lei Zhang wrote: > On 2016/11/01 12:33:41, snake wrote: > > On ...
4 years, 1 month ago (2016-11-02 12:12:12 UTC) #24
snake
On linux_android_rel_ng CustomTabActivityTest.testContextMenuEntriesForLink test is failed. It is not related to my changes. What should ...
4 years, 1 month ago (2016-11-02 22:11:35 UTC) #29
Lei Zhang
lgtm with a few more nits below. Correct, the pdf/ changes here are unrelated to ...
4 years, 1 month ago (2016-11-02 23:56:58 UTC) #30
snake
https://codereview.chromium.org/2455403002/diff/60001/pdf/document_loader_unittest.cc File pdf/document_loader_unittest.cc (right): https://codereview.chromium.org/2455403002/diff/60001/pdf/document_loader_unittest.cc#newcode33 pdf/document_loader_unittest.cc:33: // The objects, which create its, should be destroyed ...
4 years, 1 month ago (2016-11-03 00:07:29 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2455403002/80001
4 years, 1 month ago (2016-11-03 00:07:56 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/295506)
4 years, 1 month ago (2016-11-03 00:16:52 UTC) #36
snake
Robert Sesek, for ui/gfx/range/OWNERS - new pdf/DEPS entry
4 years, 1 month ago (2016-11-03 00:27:59 UTC) #37
Robert Sesek
lgtm
4 years, 1 month ago (2016-11-03 00:28:20 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2455403002/80001
4 years, 1 month ago (2016-11-03 01:03:14 UTC) #40
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-03 02:13:47 UTC) #42
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/3704ccf02007dd912933abc3f3006159171bc41b Cr-Commit-Position: refs/heads/master@{#429514}
4 years, 1 month ago (2016-11-03 02:15:29 UTC) #44
dsinclair
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2551153002/ by dsinclair@chromium.org. ...
4 years ago (2016-12-05 18:29:42 UTC) #45
dsinclair
4 years ago (2016-12-06 21:38:15 UTC) #46
Message was sent while issue was closed.
On 2016/12/05 18:29:42, dsinclair wrote:
> A revert of this CL (patchset #5 id:80001) has been created in
> https://codereview.chromium.org/2551153002/ by mailto:dsinclair@chromium.org.
> 
> The reason for reverting is: Breaks loading of linearized Dynamic XFA
documents.
> e.g. The 'Dynamic Form Sample' on
> https://www.idrsolutions.com/jpdfforms/xfa-html5-example-conversions/ breaks
> when loaded through the website. It loads correctly off of disk..

I ended up needing to revert this as I couldn't get the form to work correctly
with this code. The revert is in https://codereview.chromium.org/2558573002/.

Powered by Google App Engine
This is Rietveld 408576698