commit 2abe7714078a0f772af2e3e2675d6f2b3c054e08
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Wed Sep 21 14:42:33 2022 +0200

    Fixup 572b06d6: reduce cache size for breakString
    
    This was necessary only due to bug #12534.
    
    Reduce the size from 10Mb to 1Mb. Profiling shows that the cache hit rate
    is the same.
---
 src/frontends/qt/GuiFontMetrics.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiFontMetrics.cpp 
b/src/frontends/qt/GuiFontMetrics.cpp
index c227c28..54d5fbd 100644
--- a/src/frontends/qt/GuiFontMetrics.cpp
+++ b/src/frontends/qt/GuiFontMetrics.cpp
@@ -94,7 +94,7 @@ namespace {
 int const strwidth_cache_max_cost = 1024 * 1024;
 // Limit breakstr_cache_ total cost to 10MB of string data.
 // This is useful for documents with very large insets.
-int const breakstr_cache_max_cost = 10 * 1024 * 1024;
+int const breakstr_cache_max_cost = 1024 * 1024;
 // Qt 5.x already has its own caching of QTextLayout objects
 // but it does not seem to work well on MacOS X.
 #if (QT_VERSION < 0x050000) || defined(Q_OS_MAC)
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to