Skip to content
Commit 53f531d5 authored by Sergio Martins's avatar Sergio Martins
Browse files

Don't use 1.5 GB when importing a big maildir.

The code was creating 70k ItemCreateJobs first, and then starting them all.
That makes mem usage reach a peak of 1.5GB here.
It does have code to do one event loop iteration every 20 e-mails,
but that only makes it fire one ItemCreateJob, so they pile up anyway.

Solution is to throttle ItemCreationJob creation.

CPU-wise, this solution and the old one are equivalent,
they are both equally fast.

REVIEW: 111469
parent ae5190d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment