]> 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, 23 Nov 2021 15:31:30 +0000 (16:31 +0100)
commita5b3881467215b033ac683ba545d05d5e01cf2fb
treec24172bddeb3d20355c08223b922f02661383f93
parentdbf644fb03a25f7370d1e893f38cb5dc15a53dde
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