]> git.lyx.org Git - lyx.git/commit
Do not compute metrics at each preview when loading file
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 21 Dec 2023 15:33:06 +0000 (16:33 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 Apr 2024 11:06:26 +0000 (13:06 +0200)
commit244969330108a89f4be93d3b2eb9024bdb756204
treeb01e3555c5ed9318b91acd94780947de1525364c
parentf15d2ebf3819913114ab93d1ff7e140cb26b03d5
Do not compute metrics at each preview when loading file

With the branch-test.lyx file from #12297, loading takes forever when
previews are activated. This is because each preview element causes a
full screen metrics recomputation.

This commit just skips these calls and only does one when all previews
have been obtained. As a result, computing the previews takes 1 second
instead of 25 seconds on branch-test.lyx.

Part of bug #12297.
src/graphics/PreviewLoader.cpp