Optimizing PDF bigger than 150 Pages takes hours

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Post Reply
pesce
User
Posts: 3
Joined: Fri Aug 09, 2019 1:09 pm

Optimizing PDF bigger than 150 Pages takes hours

Post by pesce » Fri Aug 09, 2019 3:04 pm

Hello!

I need to optimize large PDF Files, i.e. use "Save as optimized PDF".

By large I mean both in size and number of pages. Sample PDF documents can be found here
The PDF files are produced by a Java Swing application. They contain many complex transparent objects which can be optimized.

PDF-Xchange Pro is able to optimize these files and compress them by about a factor 10:1 :D However it takes hours (!) to complete :(

Results, when the document contain
  • 100 pages only: Duration 2 mins
  • 150 pages only: Duration 5 mins
  • 250 pages only: Duration 20 mins
  • full ca. 1000 pages: ca 6 hours
Windows version: Microsoft Windows 10 Pro, Version 10.0.16299 Build 16299.
PDF-XChange Editor Version: Version 8 Build 331.0
Hardware: LENOVO_MT_20HG_BU_Think_FM_ThinkPad T470s, i7-7600U CPU @ 2.80GHz, Physical Memory (RAM): 20.0 GB

Optimizer Settings, see Attachment. Note, especially the last setting "Find and remove content outside of the Crop Box" is very important and only this setting leads to small PDFs
Optimize_Settings.PNG
Many thanks for your help

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 2738
Joined: Wed Jan 03, 2018 6:52 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by TrackerSupp-Daniel » Tue Aug 13, 2019 4:55 pm

Hello Pesce,

Thank you for the report, optimizing is a very in depth process, and as the odds are slim that every page is identical, a simple "X pages takes Y time" comparison doesn't really work in this case.

The content that optimization needs to sift through changes from page to page, and while it might not seem like much, this includes the tiny aspects that even the human cannot pickup. Take this screenshot for example.
image.png
On Page 3, there are arrows creates as images, which is no big issue. There are however also a few dozen images that are "Clipped" to 1x1 and completely invisible to the naked eye. each of these will negatively impact the optimization time, a cursory glance through the rest of the document shows many pages are setup like page 3. Conversely, Page 2 is very clean with no images whatsoever, and minimal content to go through, which will result in a more efficient optimizing.
image.png
image.png (11.08 KiB) Viewed 431 times
In practice, if the issue is that optimizing locks up the Editor and you are unable to use it during this processing time, I might advise using PDF-Tools for the process instead, as it offers all the same functions, while also able to run in the background. It may not be ideal, but it is expected for a multiple hundred page document to take tens of minutes, upwards to multiple hours, for optimizing, depending on the content on each page.

We on the support team are running some additional tests with your documents to see if we can find something that would provide any improvement.

Kind regards,
Daniel McIntyre
Support Technician
Tracker Software Products (Canada) LTD

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 2738
Joined: Wed Jan 03, 2018 6:52 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by TrackerSupp-Daniel » Tue Aug 13, 2019 6:17 pm

Hello Pesce,

Thank you again for the report, These tests have brought an issue we hadn't caught before to light. It appears that each consecutive page being processed by "save as optimized" with your settings takes slightly longer to be processed. IE pages 1-10 take under a second, pages 40-50 take around 1 second each, pages 100+ take multiple seconds each, and so on. I have reported this to the Development team and created a high priority ticket to rectify this issue. I cannot speak for when it will be resolved, but we are working on it currently.

For reference, you can ask any member of our support team for the following ticket number, and we will provide an update if available:
RT#4872: Optimization Takes longer per page processed

I am looking for a workaround you can use to speed up the process in the meantime, but have so far been unsuccessful. I will be sure to come back as soon as I have found anything that may be of use.
Daniel McIntyre
Support Technician
Tracker Software Products (Canada) LTD

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

pesce
User
Posts: 3
Joined: Fri Aug 09, 2019 1:09 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by pesce » Tue Aug 20, 2019 12:13 pm

Hi @TrackerSupp-Daniel,

Many thanks for your analysis and especially for opening a ticket.

I am looking forward to hearing from you.

Kind regards,
Pesce

User avatar
Will - Tracker Supp
Site Admin
Posts: 6820
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by Will - Tracker Supp » Tue Aug 20, 2019 3:08 pm

:)
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com

Timur Born
User
Posts: 617
Joined: Tue Jun 26, 2012 1:50 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by Timur Born » Thu Aug 22, 2019 10:49 pm

It would also be nice if XChange could use multithreading for its optimization process. Maybe something like one thread per page redacting or so.

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 2738
Joined: Wed Jan 03, 2018 6:52 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by TrackerSupp-Daniel » Thu Aug 22, 2019 11:56 pm

Hello Timur,

Optimizing should now make use of multiple cores, at least in the test build for 332 it now does as you can see the spike occurring as I begin optimizing an 800 page document:
image.png
image.png (5.3 KiB) Viewed 367 times
With that said, unfortunately the issue reported earlier in this thread is not yet resolved, so the overall process is still a long one.

Kind regards,
Daniel McIntyre
Support Technician
Tracker Software Products (Canada) LTD

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

Timur Born
User
Posts: 617
Joined: Tue Jun 26, 2012 1:50 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by Timur Born » Fri Aug 23, 2019 7:15 am

Not seeing any meaningful multi-threading here. The bottleneck is one single thread, the others are quick to come and go with little real extra load happening.
Attachments
grafik.png

chaspi
User
Posts: 1
Joined: Fri Aug 09, 2019 3:19 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by chaspi » Wed Nov 20, 2019 6:08 pm

Is there anything new on this ticket?

I run into the same when having documents with a lot of pages. I can confirm that the process gets near exponentially slower the more pages are processed but it also depends on the preprocessing. E.g. when optimizing a 200MB/1000Page file with Acrobat PRO first to 20MB/1000Page it can be processed with XChangeEditor within minutes while optimizing the 200MB/1000Page file directly takes hours (I stopped the process after 3h).

User avatar
Paul - Tracker Supp
Site Admin
Posts: 4966
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by Paul - Tracker Supp » Wed Nov 20, 2019 6:34 pm

Hi chaspi,

I have asked the team for a status update on this item and will let you know what comes back.

hth
_________________
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com

pesce
User
Posts: 3
Joined: Fri Aug 09, 2019 1:09 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by pesce » Tue Dec 10, 2019 3:13 pm

Paul - Tracker Supp wrote:
Wed Nov 20, 2019 6:34 pm
Hi chaspi,

I have asked the team for a status update on this item and will let you know what comes back.

hth
Would be really great, if you could have an update on that! :D

Many thanks,
Pascal

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 2738
Joined: Wed Jan 03, 2018 6:52 pm

Re: Optimizing PDF bigger than 150 Pages takes hours

Post by TrackerSupp-Daniel » Tue Dec 10, 2019 6:55 pm

Hello Pesce,

Thank you for reaching out to us, we have made some changes in build 334 which aimed to address this, I am just running a test on your 996 page document, and it has completed processing in the time it has taken me to write this (around 1 minute) and is now just finishing up the save process.

Can you please update the software and see if you find the same?
[Edit: I forgot to change my settings while testing this just now, going through again with your settings enabled definitely seems to be faster than it was before (~15% after a minute) but still a long process. I would still suggest updating to take advantage of this speed improvement, but know that we are still working on improvements in this area.]

Kind regards,
Daniel McIntyre
Support Technician
Tracker Software Products (Canada) LTD

Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

Post Reply