Why is PdfConverter very slow during the first conversion? How can I slove this problem
I’m using PdfConverter
to convert word to pdf.But I find that pdfConverter very slow during the first conversion.Then It gets faster.
The response time of my spring boot application use PdfConverter
is roughly 12s -> 300ms -> 300ms. So I guess there are cache in PdfConverter
.But I don’t find them.The main different time is in PdfConverter#doConvert
->XWPFDocumentVisitor#visitore() visitBodyElements
.I don’t find cache in this class.Where is the cache.
Here is a demo code you can reporduce this situation.