ScerIO / packages.flutter

👨‍💻 Plugins and packages for Flutter framework
https://pub.dev/publishers/serge.software/packages
MIT License
455 stars 447 forks source link

Pdfx Pinch - Android is lagging when zooming on large pdf's - Rendering delay mechanism #434

Open InspectlyMads opened 1 year ago

InspectlyMads commented 1 year ago

Describe the bug

Is it possible to introduce a rendering delay mechanism to address this issue? This delay would be especially beneficial in scenarios where users perform multiple zoom actions in quick succession, allowing the system to optimize rendering and improve the overall user experience.

To Reproduce Steps to reproduce the behavior:

  1. Go to PdfViewPinch
  2. Add a large pdf
  3. Zoom twice just after eachother
  4. Notice the lag on the android viewer

Expected behavior After the first zoom i expect a delay before rendering for the possibility of another zoom

Screenshots I can make a screencast if needed

Smartphone (please complete the following information):

JgomesAT commented 11 months ago

In a FLutter web the zoom and the scroll with PDFs with many pages has a similar behavior

SEGVeenstra commented 10 months ago

I think this is related to the bug I just created. https://github.com/ScerIO/packages.flutter/issues/468 I think it's blocking the UI thread on Android, while it works perfectly on iOS. That would probably explain the behavior on Flutter Web as well, as I believe you cannot do multi-threading on web.