Greetings!
We are running Aspose.OCR in Docker linux ontainer and every OCR operation consumes a lot of ram and some of this RAM is not freed.
Here’s a memory consumption stats for container running two OCR operations:
image.png (66.8 KB)
And one more memory graph after container restart and OCRing File2:
image.png (75.5 KB)
Code I use:
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
using OcrInput input = new OcrInput(InputType.PDF);
input.Add(temporaryFileIn);
Aspose.OCR.RecognitionSettings settings = new RecognitionSettings();
settings.Language = Language.Latin;
settings.UpscaleSmallFont = true;
settings.DetectAreasMode = DetectAreasMode.TABLE;
var ocrResult = recognitionEngine.Recognize(input, settings);
Aspose.OCR.AsposeOcr.SaveMultipageDocument(temporaryFileOut, Aspose.OCR.SaveFormat.Pdf, ocrResult);
Why this happens? Is there any way to limit memory consumption of OCR?