We are building an app that involves presenting a PDF to the user. The PDF is currently stored in an accessible S3 bucket. When the PDF component attempts to render the PDF, there is a 4-5 second lag where the entire window hangs. It is then laggy when scrolling through the PDF, which is just 2 pages.
Does anyone have experience with a laggy PDF? It isn't an issue with the request, since that finishes instantly. I can also paste the raw base64 PDF data into the PDF input and the lag is still there. It's the rendering of the document itself.
When you retrieve the PDF from S3 are you dynamically the base64 data to the PDF component or referencing it using a signed URL? Since the PDF is only 2 pages I imagine the size of the file is relatively small but would you mind sharing that as well for extra context?
Hi @Kabirdas, I have tried both loading the PDF from a url (not signed) and copying in the pdf data directly. Is there a CORS header or some meta data in the pdf that could slow it down?
At times passing the base64 data through the app model can cause performance issues if it's particularly large. That wouldn't be the case if you're using the URL though. Would you be willing to share the link to the PDF that's causing issues or would it be ok if we stepped into your app to take a look first-hand?
Thank you for looking into this! I was using an older version of self-hosted. Version 2.115 seems to have patched the issue. From the update log: " * Fixed an issue where the PDF component may crash when loading certain PDF files." https://updates.retool.com/en/whats-new-in-self_hosted-retool-2115-42807737?role=s_kemHmglJ21233
Ah great find! Glad that's working