-
Notifications
You must be signed in to change notification settings - Fork 15
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
#153: Faster PDF preview generation #271
Conversation
Awesome that we touched base with and wired some advanced stuff from Rust side to Kotlin. Manual testing on a folder with many big PDF files produced the following results:
The folder contains 469 documents, size of each is from 41KB to 21MB. |
PDF archive for testing (487MB): |
We could switch to Medium Quality for rendering preview. I have tested it and it indicated that it will significantly cut down the time cost while providing previews with similar quality. |
c603b87
to
241fd7d
Compare
0ed0262
to
ac7f49b
Compare
State of the things: after recent changes in If we look closer at this thread: ajrcarey/pdfium-render#59, we'll notice that changes in I suggest to do the simplest thing for this moment and ensure that all PDF previews are generated sequentially. We could batch PDF resources into separate set and process it from a dedicated thread/coroutine. @mdrlzy probably you could implement it? |
Also this feature could help us to debug this ARK-Builders/ark-android#61 |
Sequential previews generation benchmark:
OS: Android 11 Results (total indexing time, previews/thumbnails generation is the bottleneck): |
I think we should merge this PR, but also implement:
We need to take this task in-scope:
|
Maybe wrong orientation is because of this? |
@mdrlzy I just realized that we can implement sequential rendering of PDF previews simply using a shared atomic variable |
Superseded #329 |
#153
Adopting new PDF functionality from arklib
See ARK-Builders/arklib#11 and ARK-Builders/arklib-android#7 for details