ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

#153, #304: PDF preview generation with Rust #329

Closed mdrlzy closed 1 year ago

mdrlzy commented 1 year ago

153, #304

kirillt commented 1 year ago

One more benchmark OS: Android 11 Device: Samsung Galaxy Note 10+ Benchmark data: 477 PDF files, 857 MB total

Comparing:

Parallel previews/thumbnails rendering is ON, that's why results are quicker than in https://github.com/ARK-Builders/ARK-Navigator/pull/271.

In this PR, PDF rendering is limited to be performed only for 1 PDF at a time, but thumbnails should still be scaled down from ready previews in parallel.

Results (total indexing time, previews generation is the bottleneck): main: 26 sec this PR: 47 sec

Accepting this PR because we value portability higher in this project and also performance penalty might be temporary.

We need to make https://github.com/ajrcarey/pdfium-render thread-safe :)