I'm working on a niche market document product with LLM powered search and data extraction. Ive been developing with nextjs for the frontend and using pdftron for rendering PDFs in the browser. PDFs are linearized and size optimized, but loading times can be very long, 10+ seconds before I see the queried page rendered. I think this is because the PDFs are very big (sometimes 3000+ pages).
How would you handle this? Should I figure out a way to break into smaller files? Is there a better front end component for loading/rendering pages? Should I move to a nextron type app and make sure the files are present locally? Any suggestions appreciated.