How to improve ExtractPages/ReplacePages speed`?  SOLVED

PDF-XChange Editor SDK for Developers

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

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
Woodgnome
User
Posts: 27
Joined: Tue Oct 10, 2017 11:25 am

How to improve ExtractPages/ReplacePages speed`?

Post by Woodgnome » Thu Jan 16, 2020 3:16 pm

A customer contacted our support claiming that the our PDF viewer (using the Editor SDK) is freezing unexpectedly - after some debugging it turns out it's just working on extracting/replacing pages and it takes a long time.

I was able to reproduce this behaviour in the sample full demo (using the latest SDK version):

https://youtu.be/NwX52u8htcs

Especially the replace pages operation speed (10 seconds) seems a bit absurd - is there a way you/I can speed up these operations?

PDF in question: https://drive.google.com/open?id=1Fdc1E ... sp9XxkqgLN

User avatar
Sasha - Tracker Dev Team
User
Posts: 4871
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to improve ExtractPages/ReplacePages speed`?

Post by Sasha - Tracker Dev Team » Fri Jan 17, 2020 12:39 pm

Hello Woodgnome,

Are you using Debug or Release version of the FullDemo application (the processing time can drastically differ)?
Can that behavior be recreated in the End-User Editor?

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Woodgnome
User
Posts: 27
Joined: Tue Oct 10, 2017 11:25 am

Re: How to improve ExtractPages/ReplacePages speed`?

Post by Woodgnome » Mon Jan 20, 2020 9:03 am

Sasha - Tracker Dev Team wrote:
Fri Jan 17, 2020 12:39 pm
Are you using Debug or Release version of the FullDemo application (the processing time can drastically differ)?
Can that behavior be recreated in the End-User Editor?
Release version and yes: https://youtu.be/phavV92jZVc

It may be worth pointing out that there is a large amount of layers in the PDF (added by our application) - not sure if that affects processing time.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4871
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to improve ExtractPages/ReplacePages speed`?  SOLVED

Post by Sasha - Tracker Dev Team » Mon Jan 20, 2020 3:23 pm

Hello Woodgnome,

The layers are not a problem. We've analyzed the document itself (Save As Optimized/Audit) - the majority of the document are the images inside of it - near 74%. And also, the document itself is not that small - 50mb for 67 pages. Thus you will have to wait for some time so that all of that images are placed back into the original document.
When optimized with the default settings - the document becomes smaller - near 20mb and also, all of the operations that you were doing became almost instant.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Woodgnome
User
Posts: 27
Joined: Tue Oct 10, 2017 11:25 am

Re: How to improve ExtractPages/ReplacePages speed`?

Post by Woodgnome » Tue Jan 21, 2020 10:33 am

Alright, I assume the corresponding SDK operation to optimize a document is this one: https://sdkhelp.tracker-software.com/vi ... t_optimize, yes?

User avatar
Sasha - Tracker Dev Team
User
Posts: 4871
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to improve ExtractPages/ReplacePages speed`?

Post by Sasha - Tracker Dev Team » Tue Jan 21, 2020 10:55 am

Hello Woodgnome,

Yes that's the one. But note that the optimization lowers the quality of the images - so you need to be careful with the parameters.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Woodgnome
User
Posts: 27
Joined: Tue Oct 10, 2017 11:25 am

Re: How to improve ExtractPages/ReplacePages speed`?

Post by Woodgnome » Tue Jan 21, 2020 11:37 am

Got it 👌

User avatar
Sasha - Tracker Dev Team
User
Posts: 4871
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to improve ExtractPages/ReplacePages speed`?

Post by Sasha - Tracker Dev Team » Tue Jan 21, 2020 12:06 pm

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply