mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 10:33:41 +02:00
Batch operation by priority for offline folders
This commit is contained in:
@@ -48,6 +48,12 @@ public class TupleOperationEx extends EntityOperation {
|
||||
PartitionKey getPartitionKey(boolean offline) {
|
||||
PartitionKey key = new PartitionKey();
|
||||
|
||||
if (offline) {
|
||||
// open/close folder is expensive
|
||||
key.priority = this.priority + 10;
|
||||
return key;
|
||||
}
|
||||
|
||||
if (FETCH.equals(name))
|
||||
try {
|
||||
JSONArray jargs = new JSONArray(args);
|
||||
@@ -62,9 +68,6 @@ public class TupleOperationEx extends EntityOperation {
|
||||
key.priority = this.priority;
|
||||
key.operation = this.name;
|
||||
|
||||
if (offline)
|
||||
key.priority += 10;
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user