Improve mail sync performance with connection pooling and larger batches
This commit is contained in:
@@ -111,7 +111,8 @@ async def fetch_mail_async(
|
||||
downloaded_count = 0
|
||||
|
||||
# Download messages in parallel batches for better performance
|
||||
BATCH_SIZE = 5
|
||||
# Using 10 concurrent downloads with connection pooling for better throughput
|
||||
BATCH_SIZE = 10
|
||||
|
||||
for i in range(0, len(messages_to_download), BATCH_SIZE):
|
||||
# Check if task was cancelled/disabled
|
||||
@@ -487,7 +488,8 @@ async def fetch_archive_mail_async(
|
||||
downloaded_count = 0
|
||||
|
||||
# Download messages in parallel batches for better performance
|
||||
BATCH_SIZE = 5
|
||||
# Using 10 concurrent downloads with connection pooling for better throughput
|
||||
BATCH_SIZE = 10
|
||||
|
||||
for i in range(0, len(messages_to_download), BATCH_SIZE):
|
||||
# Check if task was cancelled/disabled
|
||||
|
||||
Reference in New Issue
Block a user