]> git.lyx.org Git - lyx.git/commitdiff
Stephan has checked that caching is still needed on macOS
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 25 Nov 2022 11:44:56 +0000 (12:44 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 25 Nov 2022 11:44:56 +0000 (12:44 +0100)
Basically removing the cache makes getTextLayout 17x more expensive on
a simple test of scrolling through the Tutorial.

TODO.killqt4
src/frontends/qt/GuiFontMetrics.cpp

index 07cca2beeba5c5dec3fb0335b0b245bed74dd7e6..a79d0ebef2932f26cb87cb1288263841183c9b4e 100644 (file)
@@ -1,5 +1,4 @@
 Things left to do after killing Qt4 (obtained by grepping for Qt4 and 'Qt 4'):
-* look at the FIXME KILLQT4 comments in src/ and resolve them
 * update INSTALL.cmake
 * update INSTALL.MacOSX
 * update cmake
index b3bdac6f732712b7ddf6c898ed53f867aa52b883..a48523089f3b4997ee35f986bb6368a66ebc7b5f 100644 (file)
@@ -84,7 +84,8 @@ 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 defined(Q_OS_MAC)
-//FIXME KILLQT4: check wether setting the cache to 0 hurts on macOS
+// For some reason, the built-in cache of QTextLayout does not work or
+// exist on macOS.
 // Limit qtextlayout_cache_ size to 500 elements (we do not know the
 // size of the QTextLayout objects anyway).
 int const qtextlayout_cache_max_size = 500;