]> git.lyx.org Git - features.git/commit
Increase metrics cache maximal size
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 5 Oct 2021 13:52:31 +0000 (15:52 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 7 Dec 2021 16:04:47 +0000 (17:04 +0100)
commit572b06d64052f2ba75c6b4c473e19a2b9369de58
tree68b5e3cc308100c6127f628e7f46c7c1e1bc8b4a
parent5966d4fb8df1ea09564c1c7cd4391c150440c644
Increase metrics cache maximal size

Increase the maximal size of the breakString cache (to compute where
to break lines) from 512kB to 10MB. This has a big impact of cache
hits on large file like the example in #12297, which is now 99%. On
this example the time taken by breakString decreases from 33.5us to
2.4us.

The string width cache has been increased fro 512kB to 1MB, but this
does not make such a big difference.

Additionally, comments and variable names have been improved.

Related to bug #12297.
src/frontends/qt/GuiFontMetrics.cpp