]> git.lyx.org Git - features.git/commitdiff
Revert "Fixup 572b06d6: reduce cache size for breakString"
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 7 Nov 2022 23:10:18 +0000 (00:10 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 7 Nov 2022 23:12:40 +0000 (00:12 +0100)
10MB cache is not so large after all, and it can be helpful with
Scott's perverse examples.

This reverts commit 2abe7714078a0f772af2e3e2675d6f2b3c054e08.

Fixes part of bug #12598.

src/frontends/qt/GuiFontMetrics.cpp

index 54d5fbd2eacba766b7cd57bc3e1503d5adf362b6..c227c28d2528fab293579be1f47729a4b68bcdc7 100644 (file)
@@ -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 = 1024 * 1024;
+int const breakstr_cache_max_cost = 10 * 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)