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.
This commit is contained in:
parent
a1a3313ed4
commit
8f4af5f78f
|
@ -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…
Reference in New Issue
Block a user