Recently i was tasked with upgrading our usage of the Editor SDK from x86 to x64. We went from version PDFXEditCore.x86.dll version 6.0.321.0 to PDFXEditCore.x64.dll version 7.0.327.1. Everything seems to work fine, however we noticed a large increase in the amount of time it takes to save documents, especially as the documents get larger. I am providing some code snippets that we are using. I have a PDF file I can send you folks that i have been using to test and that i used to gather the below metrics, but it is too large to upload here (~60 MB). The only modification I made to the document while gathering the metrics below was adding a single bookmark to the first page of the document. The 'IPXV_Document.Save()' metric indicates the amount of time spent waiting just that method to evaluate, while the regular 'Save' metric includes the time to evaluate 'IPXV_Document.Save()' + all of our client logic. All code presented below is written in VB.Net
x86 Editor SDK - Loading 1 document, 1969 pages
Code: Select all
AxPDFXEdit.OpenDocFromPath(String file, ICab oReadOnlyParams)oReadOnlyParams= nothing in most cases, in some circumstances is set before loading the document via the following :
Code: Select all
oReadOnlyParams = AxPXV_Control.Inst.CreateOpenDocParams()
Dim pOpenParamsRoot As ICabNode = oReadOnlyParams.Root
Dim secPerms As Integer = PXC_PermsFlags.PermF_All And Not (PXC_SecurityPermissions.Permit_Copying_And_TextGraphicsExtractions Or
PXC_SecurityPermissions.Permit_Printing Or
PXC_SecurityPermissions.Permit_HighQualityPrinting)
pOpenParamsRoot.SetInt("SecPermMask", secPerms)
x86 Editor SDK - Saving 1 document, 1969 pages
Code: Select all
strPDFFileName = AxPXV_Control.Src
destPath = IAFS_Inst.DefaultFileSys.StringToName(strPDFFileName)
res = CInt(PDFXEdit.PXV_DocSaveFlags.PXV_DocSave_NoProgress)
' only local file name
IPXV_Document.Save(destPath, res)Perf: IPXV_Document.Save() Time: 00:00:01.5471742, Documents: 1, Pages: 1969, WorkingSet: 797863936, Paged: 736317440
Perf: Save Time: 00:00:01.6906228, Documents: 1, Pages: 1969, WorkingSet: 797569024, Paged: 734384128
x64 Editor SDK - Loading 1 document, 1969 pages
The following code is exactly the same as used in the x86 implementation
Code: Select all
AxPDFXEdit.OpenDocFromPath(String file, ICab oReadOnlyParams)oReadOnlyParams= nothing in most cases, in some circumstances is set before loading the document via the following :
Code: Select all
oReadOnlyParams = AxPXV_Control.Inst.CreateOpenDocParams()
Dim pOpenParamsRoot As ICabNode = oReadOnlyParams.Root
Dim secPerms As Integer = PXC_PermsFlags.PermF_All And Not (PXC_SecurityPermissions.Permit_Copying_And_TextGraphicsExtractions Or
PXC_SecurityPermissions.Permit_Printing Or
PXC_SecurityPermissions.Permit_HighQualityPrinting)
pOpenParamsRoot.SetInt("SecPermMask", secPerms)
x64 Editor SDK - Saving 1 document, 1969 pages
Code: Select all
strPDFFileName = AxPXV_Control.Src
destPath = IAFS_Inst.DefaultFileSys.StringToName(strPDFFileName)
res = CInt(PDFXEdit.PXV_DocSaveFlags.PXV_DocSave_NoProgress)
' only local file name
IPXV_Document.Save(destPath, res)Perf: IPXV_Document.Save() Time: 00:01:19.8353752, Documents: 1, Pages: 1969, WorkingSet: 707674112, Paged: 649527296
Perf: Save Time: 00:01:19.9251770, Documents: 1, Pages: 1969, WorkingSet: 708608000, Paged: 650010624
So for some reason, after the upgrade we are seeing much better results (~10x better) when loading documents, but much worse results (~10x worse) when saving them. I also tried implementing a stream-based saving solution based on your 'FullDemo' for the Editor SDK, however that seems to perform about the same with given our circumstances. Please let me know if i can provide more information or clarify anything. Thanks for your time.