[Kde-pim] Review Request 111469: Don't use 1.5 GB of memory when importing big maildir

Andras Mantia amantia at kde.org
Wed Jul 10 23:39:39 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111469/#review35850
-----------------------------------------------------------

Ship it!


Nice, thanks for looking at this and finding a better solution then my original attempt to limit the number of jobs. One request only: please rename subJobResults to something more meaningful, like "processEntryJobResult" or such.

- Andras Mantia


On July 10, 2013, 10:20 p.m., Sergio Luis Martins wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111469/
> -----------------------------------------------------------
> 
> (Updated July 10, 2013, 10:20 p.m.)
> 
> 
> Review request for KDEPIM and Volker Krause.
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   resources/maildir/retrieveitemsjob.cpp 6afedec 
>   resources/maildir/retrieveitemsjob.h dfc7095 
> 
> Diff: http://git.reviewboard.kde.org/r/111469/diff/
> 
> 
> Testing
> -------
> 
> Imported a big maildir. Mem goes to 60MB max
> 
> 
> Thanks,
> 
> Sergio Luis Martins
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list