Printing on Android is slow |
|||||
Issue descriptionSteps to reproduce the problem: Printing on android has two step. First onLayout is called and the onWrite. The purpose of onLayout is to figure out how many pages the printed document has. It is allowed to return PAGE_COUNT_UNKNOWN as the number of pages. In this case the page count will be determined from the document written in onWrite. In my experiments a complicated web page (cultofmac.com mobile version) lays out in 2.3 seconds and is written in 2.8 seconds. As the layout is almost as slow as the write, can we just return UNKNOWN_PAGE_COUNT instead of spending 2.3 seconds? Of course this would only make sense if in the case we "skip" the layout the write does not get longer. As a side-effect this would fix issue 593387. Please make sure that this behavior does not cause issues in Android versions older than N. Esp. please verify that you can select and actually print a set of pages that does not include the last page. What is the expected behavior? What went wrong? We might be able to speed up printing by 2.3 seconds. Did this work before? N/A Chrome version: 51.0.2704.36 Channel: n/a OS Version: N Flash Version: Shockwave Flash 21.0 r0
,
Jun 2 2016
,
Jun 17 2016
,
Apr 7 2017
,
Jun 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6f1e92580993746423754ec992be005c7d102afc commit 6f1e92580993746423754ec992be005c7d102afc Author: Shimi Zhang <ctzsm@chromium.org> Date: Mon Jun 12 20:50:34 2017 [Android] Set page count to unknown in onLayout stage for printing This CL: 1) Set page count to unknown for PrintDocumentInfo in onLayout stage since we don't need to report pages count of a file. Android framework will get page count from the file produced from onWrite stage. This change will fix crbug/593387. 2) Removed printing jobs started from onLayout. We don't need to report pages count of the file at that stage, hence no need to start printing jobs from onLayout. As a replacement, starting all printing jobs from onWrite. It is related to crbug/612315, but crbug/612315 is not really true about saving file generating time since we didn't generate a file twice. 3) With other cleanup because variables such as mLastKnownMaxPages is not useful anymore. Bug: 593387, 612315 Change-Id: Ic52d9aa12b4aeb659156e1e2eb21f2f11afbd60c Reviewed-on: https://chromium-review.googlesource.com/521205 Commit-Queue: Shimi Zhang <ctzsm@chromium.org> Reviewed-by: Nicolas Dossou-Gbété <dgn@chromium.org> Cr-Commit-Position: refs/heads/master@{#478753} [modify] https://crrev.com/6f1e92580993746423754ec992be005c7d102afc/printing/android/java/src/org/chromium/printing/PrintingControllerImpl.java
,
Jun 12 2017
,
Jun 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/11edc8dc94dffca4c32649699efbaae1099143db commit 11edc8dc94dffca4c32649699efbaae1099143db Author: Henrik Grunell <grunell@chromium.org> Date: Tue Jun 13 08:47:22 2017 Revert "[Android] Set page count to unknown in onLayout stage for printing" This reverts commit 6f1e92580993746423754ec992be005c7d102afc. Reason for revert: Suspecting that this causes flaky failure, see bug. Original change's description: > [Android] Set page count to unknown in onLayout stage for printing > > This CL: > > 1) Set page count to unknown for PrintDocumentInfo in onLayout > stage since we don't need to report pages count of a file. Android > framework will get page count from the file produced from onWrite > stage. This change will fix crbug/593387. > > 2) Removed printing jobs started from onLayout. We don't need to > report pages count of the file at that stage, hence no need to > start printing jobs from onLayout. As a replacement, starting all > printing jobs from onWrite. It is related to crbug/612315, but > crbug/612315 is not really true about saving file generating time > since we didn't generate a file twice. > > 3) With other cleanup because variables such as mLastKnownMaxPages > is not useful anymore. > > Bug: 593387, 612315 > Change-Id: Ic52d9aa12b4aeb659156e1e2eb21f2f11afbd60c > Reviewed-on: https://chromium-review.googlesource.com/521205 > Commit-Queue: Shimi Zhang <ctzsm@chromium.org> > Reviewed-by: Nicolas Dossou-Gbété <dgn@chromium.org> > Cr-Commit-Position: refs/heads/master@{#478753} TBR=dgn@chromium.org,ctzsm@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 593387, 612315 , 732698 Change-Id: I5d74580fb52438aac13f9b9da7fb22206c73d5d8 Reviewed-on: https://chromium-review.googlesource.com/532894 Reviewed-by: Henrik Grunell <grunell@chromium.org> Commit-Queue: Henrik Grunell <grunell@chromium.org> Cr-Commit-Position: refs/heads/master@{#478937} [modify] https://crrev.com/11edc8dc94dffca4c32649699efbaae1099143db/printing/android/java/src/org/chromium/printing/PrintingControllerImpl.java
,
Jun 15 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by rsgav...@chromium.org
, May 20 2016Labels: triage-te