pdfview-android
pdfview-android copied to clipboard
Taking too long to show pdf with more number of pages
For some of the PDFs with 10 or more pages, it is taking too long to render the pdf. At least we should show the first page quickly, then on demand we can progressively load other pages when the user scrolls it.
Current implementation does exactly that, we don't render all pages. What is "too long" in seconds? Sample app have more than 200 pages and loading within a second roughly. Isn't it the same for you?
It is taking around 3-4 seconds to load just the first page of a PDF with 10 to 20 pages.
@pradeep-orbi which performance do you see on sample with 200+ pages on the same device? It may not be related to amount of pages.
I did not try the sample app. It is nothing to do with device. This issue was there in all the devices. The show() method is taking too long(3-4 seconds). Added loader until the show method returns.
This is one of the PDFs with which i have the issue https://www.orchardsoft.com/wp-content/uploads/2021/03/2018_orchardsoftware_pathology_reports.pdf
I did not try the sample app. It is nothing to do with device. This issue was there in all the devices. The show() method is taking too long(3-4 seconds). Added loader until the show method returns.
This is one of the PDFs with which i have the issue https://www.orchardsoft.com/wp-content/uploads/2021/03/2018_orchardsoftware_pathology_reports.pdf
Which callback did you use to show and hide the loader?
@miq0717 showing the loader before calling pdf_view.fromFile(localPdfFile).show() method And hiding the loader in PDFRegionDecoder class. just before the decodeRegion() method returns a bitmap, i'm hiding the loader.