commit 04350ad288e2147d4874ca4efc57f38a957ba82c
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Tue Apr 18 14:02:31 2017 +0200
Cache QTextLayout objects with Qt/Mac
It seems that the internal Qt5 caching does not work well here,
especially in the case of ancient Hebrew documents.
(cherry picked from commit 5354c64b273eac7b869ca44436db7088d8c73bb4)
---
src/frontends/qt4/GuiFontMetrics.cpp | 3 ++-
status.22x | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt4/GuiFontMetrics.cpp
b/src/frontends/qt4/GuiFontMetrics.cpp
index eb95401..fbaef2a 100644
--- a/src/frontends/qt4/GuiFontMetrics.cpp
+++ b/src/frontends/qt4/GuiFontMetrics.cpp
@@ -58,7 +58,8 @@ namespace frontend {
int cache_metrics_width_size = 1 << 19;
int cache_metrics_breakat_size = 1 << 19;
// Qt 5.x already has its own caching of QTextLayout objects
-#if (QT_VERSION < 0x050000)
+// but it does not seem to work well on MacOS X.
+#if (QT_VERSION < 0x050000) || defined(Q_OS_MAC)
int cache_metrics_qtextlayout_size = 500;
#else
int cache_metrics_qtextlayout_size = 0;
diff --git a/status.22x b/status.22x
index 97fbaa4..dd64687 100644
--- a/status.22x
+++ b/status.22x
@@ -55,7 +55,10 @@ What's new
- fixes to cursor positionning on mouse click for right-to-left text
(bug 10569).
-- Fix metricsof full-width insets when paragraph endings are shown (bug
#10537).
+- Fix metrics of full-width insets when paragraph endings are shown
+ (bug #10537).
+
+- Fix glacial performance with ancient Hebrew text on macOS.
* INTERNALS