isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 8f4af5f78f118f2e508ca1af7e30d20a3dae8cae
parent a1a3313ed436e3892d8a5549dfc1a07ca9fc93c0
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Wed, 29 Dec 2021 22:38:50 +0100

make use of finduid[] after journal replay

we used to pass all initially loaded messages to match_tuids(), which
could be quite some when syncing old messages. as lost TUIDs result in
O(n^2) behavior, this could have a serious performance impact.

Diffstat:
Msrc/sync.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/sync.c b/src/sync.c @@ -842,6 +842,7 @@ box_loaded( int sts, message_t *msgs, int total_msgs, int recent_msgs, void *aux if (svars->state[t] & ST_FIND_OLD) { debug( "matching previously copied messages on %s\n", str_fn[t] ); + for (; msgs && msgs->uid < svars->finduid[t]; msgs = msgs->next) {} match_tuids( svars, t, msgs ); }