We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Pdfviewer search run slow

Hi Syncfusion Team,


The search of pdfviewer is super slow but it was fast in adobe reader. Especially, the document has a lot of pages. How do we speed up the search performance? 


For example,  the attached pdf took more than 20 seconds to find the words in pdfviewer but adobe reader only took 1-2 seconds.

Search: 

"Subject to the requirement that such measures are not applied in a manner which would constitute a means of arbitrary or unjustifiable discrimination against the other Party where"



Regards




Attachment: pdf_6f8e1d25.zip

6 Replies

CK Chinnamunia Karthik Chinna Thambi Syncfusion Team October 5, 2022 08:11 AM

Hi Jin,

As per the current architecture of the search function in the PDF Viewer, we need to render each page and search the entered text in the rendered page. Therefore, the amount of time taken depends on the document's page count or the first instance of the searched word matching in the PDF viewer. This might be the PDF Viewer's behaviour.

 

Kindly revert to us, if you have any concerns on this.



Regards,
CCM Karthik



JD Jinchuan DU October 5, 2022 08:45 AM

There is really no way to improve the performance?

Is there any workaround to make it faster?

Thanks.



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team October 7, 2022 01:59 AM

Hi Jin,

 

We were able to reproduce the reported issue "Search slow in the PDF Viewer". We will validate it and update further details on October 11, 2022.



Regards,
CCM Karthik



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team October 12, 2022 01:19 AM

Hi Jin,


The search text content is available in the 72nd page. If we initiate the text search from 1st page, then we send the request to retrieve the page text details from server side for unrendered page in the viewer. So, it takes time to retrieve the page text content due to server interactions. If we provide the client-side rendering support, then we can improve the text search performance. We have already logged this as a feature request. We will implement this feature in any of our upcoming releases and let you know once this feature is implemented. You can track the status using the below feedback link.


Feedback Link: PDFIUM source web assembly implementation for client-side rendering | Feature Feedback


Note: If we perform the text search on second time, we get the result within 2 seconds. We have shared the screenshot of the response in the network tab.