Poor performance with the Redact panel open and many annotations/redactions

Hi,

I’m finding that when you have many redactions on a pdf with the redaction panel open the loading of the main pdf is very slow.

I’ve linked a youtube video demoing this behaviour: https://youtu.be/7LIbY2YexrE

Here’s also a reproduction repo - GitHub - ricky-c-2001/mupdf-webviewer-react-bug-poc at many-redactions-demo (Make sure you’re on the many-redactions-demo branch)

This is my guess as to what is happening.

In the redact panel all the thumbnails for each redaction are being loaded first, then the main pdf is loading. Instead it should be flipped, the main pdf should load then the redaction thumbnails.

Thanks - a good video which showcases the problem - will investigate.