Hello,
This is our environment:
Library: Spire.Office library version: 6.10.3
OS: WIndows 10/11
Dev environment: .NET Core 6.0
Deployed at: Kubernetes (dotnet-runtime:6.0-alpine), ServerVersion: "v1.25.8+k3s1", Compiler:"gc", Platform:"linux/amd64"
We are having a problem that Spire.PDF library, that is converting different files into PDF, increase RAM and CPU usage during the time of use and we need to restart the our microservice that is using it, to free the RAM and CPU. We would like to optimize Spire library usage with some recommended techniques that don't create possible memory leaks.
We have also a problem with some multi page TIFF file that we want to convert to PDF. Spire library just crash when we try conversion to PDF. This Multi-page TIFF has 350 pages and we (maybe) get out of available RAM. What is the RAM consumption per page when converting some multipage document (Word, Multi-page TIFF) to PDF? For testing purposes we transformed one PDF book into 350 page multi-page TIFF and it was around 230MB, and on one PC with 32GB RAM it went through after maybe 2-3 minutes of processing and on another PC with less RAM it crashed with message:
"Failed to read the request form. Multipart body length limit 134217728 exceeded."
Sending you a ZIP with our code snippet in C# (how we use it) and also screenshot of CPU and RAM consumption of microservice that use Spire.Office library. It consume 6 CPUs (more than any other service we have).
Can you tell us if there is any way to improve it to manually free used resources (maybe some manual garbage collecting) after the operation is finished?
We would welcome some hints to optimize the usage of SPIRE library and to free more resources (if possible) and especially some hints how we can force cleaning the garbage collected stuff after transformation is finished.