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

Issue 2461063003: Revert of Traverse PDF page tree only once in CPDF_Document Try 2 (Closed)

Created:
4 years, 1 month ago by npm
Modified:
4 years, 1 month ago
Reviewers:
Tom Sepez, Lei Zhang, Wei Li
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Revert of Traverse PDF page tree only once in CPDF_Document Try 2 (patchset #3 id:40001 of https://codereview.chromium.org/2442403002/ ) Reason for revert: Not quite right yet. Original issue's description: > Traverse PDF page tree only once in CPDF_Document > > Try 2: main fix was recursively popping elements from the stack. Since > the Traverse method can be called on non-root nodes from GetPage(), we > have to make sure to properly update the parents. > > Try 1 at https://codereview.chromium.org/2414423002/ > > In our current implementation of CPDF_Document::GetPage, we traverse > the PDF page tree until we find the index we are looking for. This is > slow when we do calls GetPage(0), GetPage(1), ... since in this case > the page tree will be traversed n times if there are n pages. This CL > makes sure the page tree is only traversed once. > > Time to load the PDF from the bug below in chrome official build: > Before this CL: around 1 minute 25 seconds > After this CL: around 4 seconds > > BUG=chromium:638513 > > Committed: https://pdfium.googlesource.com/pdfium/+/d3a2009d75eac3cda442f545ef0865afae7b35cf TBR=tsepez@chromium.org,weili@chromium.org,thestig@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:638513 Committed: https://pdfium.googlesource.com/pdfium/+/900f421e29daf2ab62de3ae8dc821f031bc7bdb3

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -165 lines) Patch
M core/fpdfapi/parser/cpdf_document.h View 3 chunks +5 lines, -16 lines 0 comments Download
M core/fpdfapi/parser/cpdf_document.cpp View 7 chunks +113 lines, -149 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
npm
Created Revert of Traverse PDF page tree only once in CPDF_Document Try 2
4 years, 1 month ago (2016-10-28 21:10:41 UTC) #2
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/2461063003/1
4 years, 1 month ago (2016-10-28 21:10:50 UTC) #3
Tom Sepez
RS LGTM
4 years, 1 month ago (2016-10-28 21:13:07 UTC) #4
commit-bot: I haz the power
4 years, 1 month ago (2016-10-28 21:30:50 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://pdfium.googlesource.com/pdfium/+/900f421e29daf2ab62de3ae8dc821f031bc7...

Powered by Google App Engine
This is Rietveld 408576698