[Kde-pim] Review Request: Optimize ChangeRecorder to only update 8 bytes on disk when dequeuing.

Volker Krause vkrause at kde.org
Sun Oct 21 10:57:21 BST 2012


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

Ship it!


Looks good to me, but I think we lost commit f142cc25 when the implementation of changerecorder_p.h was moved into its own file.


akonadi/changerecorder_p.cpp
<http://git.reviewboard.kde.org/r/106950/#comment16260>

    The lost commit added a safety check for !stream.atEnd() to the for loop to avoid insane memory consumption when the input file is corrupt.



akonadi/changerecorder_p.cpp
<http://git.reviewboard.kde.org/r/106950/#comment16261>

    Same safety check could go here.


- Volker Krause


On Oct. 19, 2012, 1:33 p.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106950/
> -----------------------------------------------------------
> 
> (Updated Oct. 19, 2012, 1:33 p.m.)
> 
> 
> Review request for Akonadi, Volker Krause and Andras Mantia.
> 
> 
> Description
> -------
> 
> Optimize ChangeRecorder to only update 8 bytes on disk when dequeuing.
> 
> Rather than saving the whole file (of pending notifications) every
> time, just because the first item was dequeued. This reduces disk I/O
> considerably, and speeds up processing (especially in the nepomuk
> feeder). In the IMAP resource (when marking 2000 emails as read) I
> couldn't time a difference since it's mostly network-based anyway.
> But at least the disk is usable by other processes meanwhile ;)
> 
> 
> This addresses bug 300572.
>     http://bugs.kde.org/show_bug.cgi?id=300572
> 
> 
> Diffs
> -----
> 
>   akonadi/changerecorder.cpp c3d3640679a9a679449fa6f0ce1a34a9d79cf351 
>   akonadi/changerecorder_p.h 1100579aaa6beb53725bb5fc96e2e5c356cbab54 
>   akonadi/changerecorder_p.cpp 6582ba4e8391bf77686e4feabf06b4bdf6c1bfc3 
> 
> Diff: http://git.reviewboard.kde.org/r/106950/diff/
> 
> 
> Testing
> -------
> 
> changerecorder and monitornotification unit tests [is there any other that might apply?]
> Applying the patch and restarting akonadi (existing files get converted to new format).
> Running with the patch for a few days.
> Marking 2000 emails as read.
> Watching nepomukfeeder process all pending notifications.
> 
> 
> Thanks,
> 
> David Faure
> 
>

_______________________________________________
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