tdf#133976 increase the layout cache size during export

shaves 50% off the export time

Change-Id: I82f5bdcc3ad0dce21881608815bcc81f1ed3f284
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191731
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
This commit is contained in:
Noel Grandin
2025-10-01 16:49:20 +02:00
parent 07eb697003
commit 0ac36f31a4
@@ -2339,6 +2339,11 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport(LanguageType const eLanguageDe
const bool bOldLockView = mrSh.IsViewLocked();
mrSh.LockView( true );
// tdf#133976 speeds up export greatly
SwTextFrame::GetTextCache()->IncreaseMax( 10000 );
const ::comphelper::ScopeGuard aGuard(
[]() mutable { SwTextFrame::GetTextCache()->DecreaseMax( 10000 ); } );
if ( !mbEditEngineOnly )
{
assert(pPDFExtOutDevData->GetSwPDFState() == nullptr);