We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words caching

Hello,


Reading this article I found out that Aspose caches font data.

https://www.simple-talk.com/opinion/opinion-pieces/managing-memory-with-third-party-components/

For example, converting to PDF requires layout into pages, which requires measurements for each character in each font used in a document – this in turn requires finding and reading a true type font file, parsing it, and then extracting character width and other layout information. If Aspose.Words did this every time for every document converted, it would be a waste of CPU time. Likewise, if multiple documents are converted at the same time, it would also require more memory because each instance in conversion would have its own copies of fonts loaded. So, perhaps a little ironically, Aspose.Words keeps overall resource demands down by caching character width (font data) information and reusing it over and over.

Is there a list somewhere of other things that are being cached by the library?
If not, am I safe to assume that no actual document content is being cached?

Thanks,
Rafał
Hi Rafał,

Thanks for your inquiry. We are in communication with our product team about your query and will get back to you soon.

Hi Tahir,


Is there any update from the product team on this?

Thanks,
Rafał
Hi Rafał,

Thanks for your patience.

We assume you are referring to static caches. Aspose.Words does cache document's content while saving it to Pdf.

As far as the Object Model or conversion operations are concerned, there are internal caching structures in Aspose.Words that are not specific to document content. So, when the document is closed, all the DOM data is purged from memory during the next garbage collector cycle.