]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-index: Optimize modseq scanning by using the modseq header in index
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 8 Apr 2022 12:10:53 +0000 (15:10 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 14 Apr 2022 06:47:55 +0000 (09:47 +0300)
commitaa7d67e6d6eeca798f29b68d11cd2ef1f26ef21d
tree900131e588f011641bcd029777f8423335535208
parent40e2a21f83fb11cd36e109b93d2b3fd704e3536e
lib-index: Optimize modseq scanning by using the modseq header in index

View is very commonly set to start reading new changes since dovecot.index
was last written. When reading the newer records in dovecot.index.log, the
modseq of each change is needed to be known. However, the initial modseq
calculation was usually done inefficiently by reading the whole
dovecot.index.log from the beginning of the file. This change prevents
that by using instead the "modseq" header in dovecot.index to get the
initial modseq.
src/lib-index/mail-index-map-read.c
src/lib-index/mail-index-modseq.c
src/lib-index/mail-index-modseq.h
src/lib-index/mail-index-private.h
src/lib-index/mail-transaction-log-modseq.c