[Kde-pim] KOrganizer4 Is Sooo Slow

Allen Winter winter at kde.org
Mon Nov 5 01:38:33 GMT 2007


Howdy,

Finally we know why KOrganizer is so slow.

In CalendarLocal::rawEventsForDate:
      if ( event->dtStart() <= kdt ) {
        KDateTime end( event->dtEnd().toTimeSpec( event->dtStart() ) );
        if ( event->allDay() ) {
          end.setDateOnly( true );
        } else {
          end = end.addSecs(-1);
        }
        if ( end >= kdt ) {
          eventList.append( event );
        }

replaces the old code from 3.5.x:
     if ( event->dtStart().date() <= qd && event->dateEnd() >= qd ) {
        eventList.append( event );

For whatever reason, the new code is extremely slow.
Any ideas how to speed things up using the new KDateTime?

For my medium sized calender, it will take about 20seconds to move
1 month forward/backward in monthview with the new KDateTime.

I wish we could use another data structure that was faster than 
searching all Events for just a few that typically are scheduled for  a date.
Ideas?

-Allen

_______________________________________________
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