[Kde-pim] Review Request 124603: AgentManager: avoid recursion agentTypeAdded->readAgentTypes->agentTypeAdded

Daniel Vrátil dvratil at kde.org
Mon Aug 3 13:16:31 BST 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124603/#review83381
-----------------------------------------------------------

Ship it!


Minor nitpicks, fix & ship please :) Thanks!


akonadi/agentmanager.cpp (line 203)
<https://git.reviewboard.kde.org/r/124603/#comment57631>

    You should probably check `if agentType.isValid()` before inserting it to the table.



akonadi/agentmanager.cpp (line 215)
<https://git.reviewboard.kde.org/r/124603/#comment57632>

    Same here, check if `agentInstance` is valid before inserting.



akonadi/agentmanager.cpp 
<https://git.reviewboard.kde.org/r/124603/#comment57633>

    This should stay to make it easier to diagnose issues during startup.


- Daniel Vrátil


On Aug. 3, 2015, 1:40 p.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124603/
> -----------------------------------------------------------
> 
> (Updated Aug. 3, 2015, 1:40 p.m.)
> 
> 
> Review request for KDEPIM-Libraries.
> 
> 
> Repository: kdepimlibs
> 
> 
> Description
> -------
> 
> and the same with agent instances.
> With 20 instances, this would make the dbus call agentInstances()
> 20 times, when getting the notification that akonadi is starting up
> (so all processes are doing this at the same time, very bad for performance).
> 
> New solution: read agent types+instances at startup if Akonadi::Control is online,
> otherwise when getting the notification that it is, or when getting the
> signal that a type/instance was added. Always emit signals, but of course
> when doing this from the constructor nobody is listening (no problem, fast).
> The old code was using a different code path to avoid emitting signals for
> the initially loaded types+instances, so the behavior is the same.
> 
> 
> Diffs
> -----
> 
>   akonadi/agentmanager.cpp a9ac8a69ab795a6ffadf08ad7208ce70f0d9919b 
> 
> Diff: https://git.reviewboard.kde.org/r/124603/diff/
> 
> 
> Testing
> -------
> 
> With debug output above the emit statements, I checked what was emitted before and after the patch, seems to be the same.
> Tested the case where the app is up before akonadi is started, and the easier case where akonadi is up before the app.
> 
> 
> 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