Hi team,
We are seeing high latency (around 10+ sec for compressing 2 mb file). Is this expected? I saw that resource utilization was also within limit.
Hi team,
We are seeing high latency (around 10+ sec for compressing 2 mb file). Is this expected? I saw that resource utilization was also within limit.
Can you please explain a bit more by sharing sample code snippet, environment details and sample file for our reference? We will test the scenario in our environment and address it accordingly.
I am testing in local using on premise approach using docker image for aspose pdf
image: aspose/pdf-cloud:latest
I am making an Axios call from my pod to the one we created using a docker image.
let data = JSON.stringify({
"CompressImages": true,
"ImageQuality": 50,
"LinkDuplcateStreams": true,
"RemoveUnusedObjects": true,
"RemoveUnusedStreams": true,
"UnembedFonts": true,
"SubsetFonts": true,
"ImageEncoding": "Unchanged",
"RemovePrivateInfo": true,
"ImageCompressionVersion": "Standard"
});
let asposePdfUrl = getAsposePDFUrl();
let configuration = {
method: 'post',
url: asposePdfUrl + '/' + fileName + '/optimize?folder=compress',
headers: {
'accept': 'application/json',
'Content-Type': 'application/json'
},
data: data,
maxBodyLength: Infinity,
}
await axios(configuration)
.then(function (response) {
if (response.status === 200) {
logger.info(`File compressed successfully.`);
}
else {
logger.error(`Error while compressing the file, Response Status Code: ${response.status}`)
}
})
.catch(function (error) {
throw error;
});
Please note that I am able to compress file so no issues as such with compressing a document.
hi team. any update on this?
@rajatdpw
Please share your input document with us. We will investigate the issue and guide you accordingly.
It’s a 5mb file. Please try with this. Also let us know the size of compressed file as well.
SamplePDFFile_5mb.pdf (5.0 MB)
@rajatdpw
It took me 18 seconds to compress your file under your configuration.
It was only compressed from 5074 to 5066 kilobytes.
Is this the latency and compression it is supposed to take?
Please let us know if latency can be improved for above call as 18 seconds is too much and also compresses file is also not showing much changes in size
@Deepali11
We have noticed the reported issues and logged the following tickets in our issue tracking system for further investigation and rectification. We will notify you as soon as these issues are resolved.
PDFCLOUD-4438 Latency is high for optimize pdf even in on premise
@Deepali11
The issues you have found earlier (filed as PDFCLOUD-4438) have been fixed in this version 24.10. Please update docker image.