replied on April 23, 2019
First thing to note is that there could be a lot of reasons for the difference in load times. When you view PDF documents in the LF Web Viewer instead of the browser default, it breaks them into pages and that adds a lot of overhead.
However, compressing your PDFs can reduce the overall size dramatically depending on your source images (for example, color will get compressed a lot more than monochrome).
I'm not sure what code you are currently using, but if you check this thread I posted a sample of the code I use, which includes variable compression based on the average page size.
I've added things over time to account for watermarks and such, but I think the relevant part for you would be lines 30-75.