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
Please register or sign in to comment