]> git.lyx.org Git - lyx.git/commit
Cache the value of FontMetrics::xHeight()
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 15 Jul 2023 17:39:14 +0000 (19:39 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 15 Jul 2023 21:32:59 +0000 (23:32 +0200)
commit386a2ddca135da7c96a4565a2648acf06394b5cc
tree3da8771511e0a3ce9fa91ed3cf9e3c6111be756c
parentd8e509e5ebb7890f1f62bf8731cf445782cb6bc2
Cache the value of FontMetrics::xHeight()

This value is computed for the metrics of *every* Mathdata and hotspot
says that it counts for 9% of total on math-heavy "branch-test.lyx"
file. I am not sure that real world agrees with that, but profiling
shows that Qt itself does not cache the value.

Part of reinvestigation of #12297.
src/frontends/qt/GuiFontMetrics.cpp
src/frontends/qt/GuiFontMetrics.h