OptomizationOptions on document takes a long time

Hi Support,

I am trying to Optimize / compress documents before I transfer them over the wire. The applying of the optimizations options take a long time, like 50 seconds for my document.

Also I have attached the code I am using to do the compression as well as a screen shot of the settings I am trying to use.

This is using Aspose.PDF 22.9

Is there anything I or you can do to make this work faster?
Thanks John

Sample Document:

Code Snippet:

Compression Settings:

@nqzw,

Can you do me a favor and, for the sake of testing, run this code on the latest API version 23.4?

Regarding your option the more compression or optimizations enable the more time it will take, but the time depends on memory and cpu power.