Page 1 of 1

How to improve ExtractPages/ReplacePages speed`?

Posted: Thu Jan 16, 2020 3:16 pm
by Woodgnome
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

Re: How to improve ExtractPages/ReplacePages speed`?

Posted: Fri Jan 17, 2020 12:39 pm
by Sasha - Tracker Dev Team
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

Re: How to improve ExtractPages/ReplacePages speed`?

Posted: Mon Jan 20, 2020 9:03 am
by Woodgnome
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.

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

Posted: Mon Jan 20, 2020 3:23 pm
by Sasha - Tracker Dev Team
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

Re: How to improve ExtractPages/ReplacePages speed`?

Posted: Tue Jan 21, 2020 10:33 am
by Woodgnome
Alright, I assume the corresponding SDK operation to optimize a document is this one: https://sdkhelp.tracker-software.com/vi ... t_optimize, yes?

Re: How to improve ExtractPages/ReplacePages speed`?

Posted: Tue Jan 21, 2020 10:55 am
by Sasha - Tracker Dev Team
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

Re: How to improve ExtractPages/ReplacePages speed`?

Posted: Tue Jan 21, 2020 11:37 am
by Woodgnome
Got it 👌

Re: How to improve ExtractPages/ReplacePages speed`?

Posted: Tue Jan 21, 2020 12:06 pm
by Sasha - Tracker Dev Team
:)