Bug 264315 - Calendar performance is significantly worse than in 4.4.9
Summary: Calendar performance is significantly worse than in 4.4.9
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: 4.6 pre
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-26 06:09 UTC by Kumaran Santhanam
Modified: 2011-04-23 10:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kumaran Santhanam 2011-01-26 06:09:15 UTC
Version:           4.6 pre (using KDE 4.5.95) 
OS:                Linux

When paging through a moderately large calendar (~1000 entries) using the weekly agenda view, the refresh takes 1-2 seconds.  The same view in 4.4.9 takes less than 250ms.  I'm marking this bug as higher than normal priority because it makes the calendar essentially unusable for business users.

Reproducible: Always
Comment 1 Sergio Martins 2011-01-26 08:41:28 UTC
Can you test with holiday region set to "None" ?
Comment 2 Kumaran Santhanam 2011-01-26 09:20:31 UTC
Unfortunately, I have uninstalled KDE 4.6 RC2 because it was too unstable for daily use.  However, I can say that holidays are fully enabled in 4.4.9 and the performance is very good.
Comment 3 Sergio Martins 2011-01-31 21:58:38 UTC
Git commit a4723e6aa33b1b86f4c0178f5ca61a07838d5b85 by Sergio Martins.
Pushed by smartins into branch 'master'.

When all dates in the date matrix are bold, there's no point in keep processing.

CCBUG: 264315

M  +18   -1    korganizer/kodaymatrix.cpp     

http://commits.kde.org/ee6cc38b/a4723e6aa33b1b86f4c0178f5ca61a07838d5b85
Comment 4 Sergio Martins 2011-01-31 21:58:38 UTC
Git commit d02730125459c1ad73595331c1c39f09935598d5 by Sergio Martins.
Pushed by smartins into branch 'master'.

Make CalendarSupport::incidences() 100x faster.

This has a noticeable impact with 10k events.
CCBUG: 264315

M  +15   -2    calendarsupport/calendar.cpp     

http://commits.kde.org/ee6cc38b/d02730125459c1ad73595331c1c39f09935598d5
Comment 5 Sergio Martins 2011-04-23 08:04:12 UTC
Git commit e9c470c9a5d93742bc14902cd137106541853137 by Sergio Martins.
Committed on 23/04/2011 at 04:54.
Pushed by smartins into branch 'master'.

Don't call reloadTodos() when to-do view isn't visible.

Noticeable performance improvement.

CCBUG: 264315

M  +2    -1    korganizer/calendarview.cpp     

http://commits.kde.org/kdepim/e9c470c9a5d93742bc14902cd137106541853137
Comment 6 Sergio Martins 2011-04-23 09:05:30 UTC
Git commit 0a032d0d8cf00c82cfeb702641a8360376b84f95 by Sergio Martins.
Committed on 23/04/2011 at 10:12.
Pushed by smartins into branch 'master'.

Don't iterate 1000 times looking for the id, use an hash instead.

Noticeable performance improvement while chaning months in
monthview.

CCBUG: 264315

M  +12   -12   calendarsupport/calendar.cpp     
M  +2    -0    calendarsupport/calendar_p.h     

http://commits.kde.org/kdepim/0a032d0d8cf00c82cfeb702641a8360376b84f95
Comment 7 Sergio Martins 2011-04-23 09:30:22 UTC
Git commit b880540b8830fb12f2f01e35c1e9483fd327ead4 by Sergio Martins.
Committed on 23/04/2011 at 10:38.
Pushed by smartins into branch 'master'.

Call the cheapest one first.

It's also most likely to be false.

CCBUG: 264315

M  +1    -1    calendarviews/eventviews/agenda/agendaview.cpp     

http://commits.kde.org/kdepim/b880540b8830fb12f2f01e35c1e9483fd327ead4
Comment 8 Sergio Martins 2011-04-23 10:21:50 UTC
Git commit d7ed4479208ec106b2e72abfe1355f02b0894ee5 by Sergio Martins.
Committed on 23/04/2011 at 11:30.
Pushed by smartins into branch 'master'.

Only update the date navigator if it's visible.

CCBUG: 264315

M  +12   -4    korganizer/calendarview.cpp     

http://commits.kde.org/kdepim/d7ed4479208ec106b2e72abfe1355f02b0894ee5
Comment 9 Sergio Martins 2011-04-23 10:36:47 UTC
Git commit a8705c7207de8d6b95716f528806df9f36585e6d by Sergio Martins.
Committed on 23/04/2011 at 11:44.
Pushed by smartins into branch 'master'.

Call i18n 60 times, instead of 5000.

CCBUG: 264315

M  +70   -67   kcalutils/incidenceformatter.cpp     

http://commits.kde.org/kdepimlibs/a8705c7207de8d6b95716f528806df9f36585e6d
Comment 10 Sergio Martins 2011-04-23 10:38:21 UTC
Git commit 9c91a0dbf149aad90e6510eab05504c8bfe67a3e by Sergio Martins.
Committed on 23/04/2011 at 11:44.
Pushed by smartins into branch '4.6'.

Call i18n 60 times, instead of 5000.

CCBUG: 264315
(cherry picked from commit a8705c7207de8d6b95716f528806df9f36585e6d)

M  +70   -67   kcalutils/incidenceformatter.cpp     

http://commits.kde.org/kdepimlibs/9c91a0dbf149aad90e6510eab05504c8bfe67a3e
Comment 11 Sergio Martins 2011-04-23 10:42:15 UTC
It's good for me now.

If you reopen this, please attach a callgrind dump:

1. valgrind --tool=calgrind korganizer --nofork
2. Use korganizer
3. exit
4. upload generated files