Please note that performance and memory usage all depend on complexity and size of the documents you are generating.
We suggest you please use SaveOptions.MemoryOptimization property to optimize the memory performance. Setting this option to true can significantly decrease memory consumption while saving large documents at the cost of slower saving time. Hope this helps you.
You do not need to dispose any DOM object. When the document is closed, all the DOM data is purged from memory during the next garbage collector cycle. The memory may not be released until you close the application.
I forgot to mention we have already set “SaveOptions.MemoryOptimization: true” and the issue still persists. Is there any other memory handlers or solutions?
Could you further elaborate on when you mentioned “The memory may not be released until you close the application”. What I understand from this is we have to stop our web application for Aspose.Word to release the memory used and I don’t think this the right solution for us.
Could you please share some detail about your use case?
All the data is purged from memory when the document is closed. However, there may be some objects in the memory that are not disposed right after a document process is completed. These objects will be removed from memory by next garbage collector cycle.
Please note that it is quite difficult to answer such questions because CPU performance and memory usage all depend on complexity and size of the documents you are loading/generating.
It hardly depends on local environment. It can be completely different for a server that generates thousands documents 24/7 or for a local PC that generate only the one document by demand.
Another performance option is to use all processor’s cores. If you have, for instance, 8 virtual cores and 8000 documents it is better to instantiate 8 threads that will handle 1000 document each. The result will be about 5 time faster than processing all 8000 documents in the single thread.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.