Large documents, specifically 500 MB+, that were being loaded in AEV would take quite a bit of time performing some requests and would be lagging constantly.
Solution
This was split into two phases:
Phase 1: improve the getDocumentInfo and transform calls.
Phase 2: develop a pre-warming of the cache that would have an OC event around some business case that would start the call to enhancedGetObject .
Phase 1
The getDocumentInfo call was added to the ehcache to cache all subsequent calls to help performance a little bit.
The biggest improvement here was persisting the input file (.pdf) that has to be created about used for the transformation call. Instead of having to create the file, copy of the content to it, then delete temp for every transformation, we are now creating it once and persisting it in the temp location.
The temp location for Annotation Config was create and can be configurable.
A new job was created RemoveOATransformTempFilesActionExecuter to clean up those temp files after a configurable amount of time and expiration for the lastModified attribute.
Phase 2
The business case for the OC event would be on a client basis and still not decided upon yet.
The enhancedGetObject is the real problem area as it has to write it all to memory initially before it can be cached.
Another problem area as the files get larger and larger, is the initialization of the aspose document. That process can take a very long time as it rights to memory also, I believe.
Overview
Solution
getDocumentInfo
andtransform
calls.enhancedGetObject
.Phase 1
ehcache
to cache all subsequent calls to help performance a little bit.RemoveOATransformTempFilesActionExecuter
to clean up those temp files after a configurable amount of time and expiration for thelastModified
attribute.Phase 2
enhancedGetObject
is the real problem area as it has to write it all to memory initially before it can be cached.