File Marging taking long time on Azure App Service

While concating 2 PDF files of size 4 mb & 400 mb on local machine it takes 3 min but on Azure App service it takes 10 min. Could you let us know why there is so much difference.

Azure App Service Plan - 8gm RAM, 50 gb HDD
Aspose.PDF Version : 20.9 (c#)

List<string> pdfs = new List<string>();
pdfs.Add(@"C:\Users\gajanan.shinde\AppData\Local\Temp\1ks3togv\cfi_1_claim_form_rev_date_9 July 2020.pdf");
pdfs.Add(@"C:\Users\gajanan.shinde\AppData\Local\Temp\1ks3togv\400 MB.pdf");


string[] pdfPaths = pdfs.ToArray();
pdfEditor.Concatenate(pdfPaths, tempDirectory+NewFileName);

https://drive.google.com/file/d/1dQZ1vfiLnjXTRO3p8sgPeH8eQy2d-6Lc/view?usp=sharing
https://drive.google.com/file/d/1tXsPpMpqcgnvHxHlUvmzsSIYc71Yy-9E/view?usp=sharing

@gajananshinde

Would you please try using DOM approach to merge the documents as following and let us know if it is still taking large amount of time at your side:

Document doc1 = new Document("file1.pdf");
Document doc2 = new Document("file2.pdf");
doc1.Pages.Add(doc2.Pages);
doc1.Save("merged.pdf");

Hi Ali,
Thanks for your quick work around, but still it’s not work in Auzre app service, it’s take same time.

Can you please check the same and let us know.

image.png (39.6 KB)

@gajananshinde

We have also tested the scenario in our environment and were unable to notice any issue in local environment. However, we further need to investigate the scenario to determine the merge delay in Azure App Service. For the purpose, we have logged an investigation ticket as PDFNET-49008 in our issue tracking system. We will look into its details and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.