Browse Source

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.
wip/maildir-path-under-inbox
Oswald Buddenhagen 3 years ago
parent
commit
8f4af5f78f
  1. 1
      src/sync.c

1
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) { if (svars->state[t] & ST_FIND_OLD) {
debug( "matching previously copied messages on %s\n", str_fn[t] ); 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 ); match_tuids( svars, t, msgs );
} }

Loading…
Cancel
Save