Commit Graph

4 Commits

Author SHA1 Message Date
Pavel Sanda
9ccda98e6e Remove strfwd.h.
Will break cygwin due to trivstring header.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223056.html
2024-10-04 20:49:33 +02:00
Juergen Spitzmueller
d3123c16f7 initialize boolean (reported by coverity) 2024-09-07 12:55:10 +02:00
Jean-Marc Lasgouttes
0d50a8417f Do not update statisitics if buffer has not changed
Rely on the newly-introduced Buffer::id() to skip statistics
computation if the id is the same as last time. This will reduce the
annoyance of updates triggering at random times.

Take this occasion to clean code up:

- add 'skip' parameter (true by default) to Statistics::update to indicate
  that the insets that do not produce output should be skipped.

- use a trailing underscrore for private members
2024-07-24 22:38:39 +02:00
Jean-Marc Lasgouttes
6e81f31722 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.
2024-07-24 18:07:04 +02:00