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

Bertjan Broeksema b.broeksema at home.nl
Fri May 29 10:42:09 BST 2009


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

(Updated 2009-05-29 02:42:08.735942)


Review request for KDE PIM, Douglas Harms and Jason Kasper.


Changes
-------

Added vanRijns suggestion to hash the records on a description field. This really speeds up things indeed. Here are some timings. I didn't try without my patches (as it will take too long anyway =:)

  | PC    | HH    | First sync time (only the sync part)
1 | 0     | ~6000 |             25 minutes
2 | ~6000 | ~6000 | (all equal) 17 minutes           ==> Some gain here.
3 | 0     | ~6000 |             37 *seconds*         ==> Lots of speed gain here
4 | ~6000 | ~6000 |             1 minute 3 seconds   ==> Lots of speed gain here

1 and 2 are only with the QSet (1st version of the patch)
3 and 4 are with the description hash.

As far as I can see things work correct.

NOTE  I: Timings are only for the firstSync() method. It's still in the patch.
NOTE II: It still takes some time to load thousands of records from the handheld and thousands of records from the pc dataproxy. Probably we should suggest users to use purge and a historical resource to speed that up.


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 (updated)
-----

  trunk/KDE/kdepim/kpilot/conduits/todo/todohhrecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/todo/todoakonadirecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/todo/todoakonadirecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/keyringconduit/keyringhhrecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/keyringconduit/keyringhhrecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/contacts/contactshhrecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testrecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testrecordconduit.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/calendar/calendarakonadirecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/calendar/calendarakonadirecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/calendar/calendarhhrecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/calendar/calendarhhrecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/contacts/contactsakonadirecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/contacts/contactsakonadirecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/contacts/contactshhrecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/rcfirstsynctest.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testdataproxy.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testdataproxy.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testhhdataproxy.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testhhdataproxy.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testhhrecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testhhrecord.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/tests/testrecord.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/recordconduit.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/recordconduit.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/record.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/hhdataproxy.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/dataproxy.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/base/dataproxy.h 974238 
  trunk/KDE/kdepim/kpilot/conduits/akonadibase/akonadidataproxy.cc 974238 
  trunk/KDE/kdepim/kpilot/conduits/todo/todohhrecord.cc 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