[Kde-pim] Review Request: Proposal to speed up first sync

Bertjan Broeksema b.broeksema at home.nl
Fri May 29 08:04:59 BST 2009



> On 2009-05-28 19:18:42, Douglas Harms wrote:
> > Perhaps I'm missing something really obvious here, but I don't see how this will really speed up a first sync.  The situation I'm thinking about is when the hh contains many records (e.g., 5000) that are all unique (i.e., none of them are equal on the hh, and none are equal to any pc record).  As each hh record is added to the PCDataProxy, subsequent searches take progressively longer.  In this situation (ie., all new hh records are unique) I don't think any records would be added to the QSet, so no time would be saved.
> > 
> > Of course, perhaps I'm not quite understanding your proposal.
> > 
> >

The idea was that when storing already matched pcrecords in the map, some time is gained for the consecutive calls of findMatch because for each pc record that is in the map we don't call the equals method. So the assumption here is that inserting and looking up ids in the set is cheaper than calling the findMatch method for each record.


- Bertjan


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


On 2009-05-28 13:34:01, Bertjan Broeksema wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/776/
> -----------------------------------------------------------
> 
> (Updated 2009-05-28 13:34:01)
> 
> 
> Review request for KDE PIM, Douglas Harms and Jason Kasper.
> 
> 
> Summary
> -------
> 
> Use a QSet during first sync to reduce the amount of time for looking up
> matches. Each time a match is found the id of the matched pc record is added to
> the set.
> 
> The next time findMatch is called the it will again iterate over all pcrecords
> but if the pcrecord id is in the set allready the equal method will not be called.
> 
> I did not test it yet, this patch is just to show the idea.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdepim/kpilot/conduits/base/recordconduit.cc 974238 
>   trunk/KDE/kdepim/kpilot/conduits/base/recordconduit.h 974238 
> 
> Diff: http://reviewboard.kde.org/r/776/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Bertjan
> 
>

_______________________________________________
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