Application Becomes Unusable When Loading PDF/ PDF loading times > 30 seconds

I'm trying to load in a pdf file that is about 20 pages long. The total size of the pdf is less than 1mb. My application is unusable until the pdf loads and even after it loads, the application is incredibly slow. The pdf is the only thing that isn't coming directly from a table in our database. Without the pdf viewer the app runs very smoothly.

Has anyone had a similar experience with the Retool PDF viewer?

I know it has been quite a while since you posted this, but I wanted to follow up to see if you are still experiencing this issue. I tried to reproduce this behavior in my own app, but did not have much luck.

I forgot to reply back on this. Yes! The pdf loading for some docs is over a minute, for some it will cause the application to crash completely. The docs that cause this are around 50 pages long.

Where are you loading these PDFs from? Are you using a URL or a base64 string?

Actually base64 string loads much faster. I can't tell exactly what causes the slow load times but is it possible it has anything to do with the cache?

Unless you are explicitly caching results of your queries, the results should be fetched from the resource directly every time

Are you retrieving the PDF from a Database or an API?