]> git.lyx.org Git - lyx.git/commit
Rewrite statistics code
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 21 Jul 2024 20:09:28 +0000 (22:09 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 24 Jul 2024 16:07:04 +0000 (18:07 +0200)
commit6e81f317229a585e4d74b68af967873acd1f74ae
tree7cd5f7d8340bd81f10ae1ef34135348b06288036
parent8c3d3782174385d7d7a4c133b1778950b24df8cd
Rewrite statistics code

The statistics code is known to be very slow, because it relies on
DocIterator to go through the buffer.

This commit introduces a new Statistics class that encapsulates the
main code, along a virtual method Inset::updateStatistics() that
allows to fine-tune how counting is done inset by inset.

This is a faithful bug-for-bug reimplementation.

The new code appears to be 3x faster than the old one.

See bug #12929 for a discussion about statistics update woes.
20 files changed:
src/Buffer.cpp
src/Buffer.h
src/BufferView.cpp
src/Makefile.am
src/Statistics.cpp [new file with mode: 0644]
src/Statistics.h [new file with mode: 0644]
src/Text.cpp
src/frontends/qt/GuiView.cpp
src/insets/Inset.cpp
src/insets/Inset.h
src/insets/InsetCitation.cpp
src/insets/InsetCitation.h
src/insets/InsetHyperlink.cpp
src/insets/InsetHyperlink.h
src/insets/InsetQuotes.cpp
src/insets/InsetQuotes.h
src/insets/InsetTabular.cpp
src/insets/InsetTabular.h
src/insets/InsetText.cpp
src/insets/InsetText.h