Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taking too long to show pdf with more number of pages #39

Open
pradeep-orbi opened this issue Jul 31, 2021 · 6 comments
Open

Taking too long to show pdf with more number of pages #39

pradeep-orbi opened this issue Jul 31, 2021 · 6 comments

Comments

@pradeep-orbi
Copy link

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.

@Dmitry-Borodin
Copy link
Owner

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?

@pradeep-orbi
Copy link
Author

It is taking around 3-4 seconds to load just the first page of a PDF with 10 to 20 pages.

@Dmitry-Borodin
Copy link
Owner

@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.

@pradeep-orbi
Copy link
Author

pradeep-orbi commented Aug 4, 2021

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

@miq0717
Copy link

miq0717 commented Aug 29, 2021

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?

@pradeep-orbi
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants