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

App freezing, weird zoom behaviour, and lag with some PDFs #210

Open
holdit opened this issue Jun 8, 2022 · 4 comments
Open

App freezing, weird zoom behaviour, and lag with some PDFs #210

holdit opened this issue Jun 8, 2022 · 4 comments

Comments

@holdit
Copy link

holdit commented Jun 8, 2022

I tested this app on my OnePlus 8 Pro running LineageOS 18.1 (Android 11) and it struggles with some PDFs. For example, the London Underground map:

https://content.tfl.gov.uk/standard-tube-map.pdf

Using the old Google PDF reader, it works fine. It's very fluid, I can see both pages, zoom, etc. Same with other readers I tried.

This app on the other hand struggles with this file. When opening the PDF, the app sometimes freezes for a second or two. Zoom is laggy and sometimes doesn't zoom in the area I'm trying to zoom in. And if I go to the second page, the app completely freezes after a few seconds.

Google PDF vs PDF Viewer:

recording.mp4

I don't know if this an app problem, something upstream, or even if the app is supposed to work on other Android ROMs. In any case, the PDF is public and so I thought I'd post this here in case devs want to see what's going on.

@ghost
Copy link

ghost commented Jun 8, 2022

It's likely due to the fact that the PDF is extremely high detail and we render all content in HiDPI which can be noticeably slow/laggy on low end devices and extremely high detailed PDFs. It also can consume a lot of memory with PDFs like this being rendered in HiDPI.

@holdit
Copy link
Author

holdit commented Jun 9, 2022

Thanks for replying. Is there anything that I, as a user, can do to fix that?

By the way, I own a OnePlus 8 Pro. While it's no longer the fastest phone you can get, it's has the best processor from 2020 (Snapdragon 865) and enough memory (12GB). It's not a low end device.

@ghost
Copy link

ghost commented Jun 16, 2022

Some ideas: it sounds like the viewer could fallback to not use HiDPI, or it could be toggle-able for a re-render with or without HiDPI?
Personally, the former sounds like it could be flaky: depending on how it falls back (memory usage checks?)?
The latter sounds like it would enlarge the binary and require quite some code changes, not to mention that if a PDF is opened from another app, and is handled by GrapheneOS's PDF Viewer, then it would start in HiDPI (this could be adjusted), thus would already incur the overhead that you'd like to avoid.

@Sanity-Fading
Copy link

I'm experiencing the exact issue that OP described on version 16 of the app. I have a P7. The app freezes and doesn't recover when I try to scroll through a PDF. On some attempts the app doesn't crash (same PDF file), but it stutters a lot when scrolling, even if I scroll slowly. This is the first time I've used the app. I did also notice strange behaviour that if I tried to scroll quickly the direction of the scroll would change after my finger lifted off the screen. For example, I'll swipe down quickly and it starts quickly going down but when I lift my finger is shoots back to the top of the first page. Same in the opposite direction.

I'm new to the github scene and not sure where to go yet to find changelogs that 5 year olds can understand. I get that this website is not aimed at someone like myself

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

2 participants