Summary: | Korganizer slow when using regional holidays setting | ||
---|---|---|---|
Product: | [Applications] kdepimlibs | Reporter: | G. Landini <g.landini> |
Component: | kholidays | Assignee: | John Layt <jlayt> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | g.landini, jlayt, smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
G. Landini
2010-09-13 17:58:30 UTC
I can confirm that this happens in the 32 as well as in the 64bit versions. Is this when using a 4.5 version of KDE and kdepimlibs but still with kdepim 4.4? If so then its because kholidays recalculates all the holidays each time it is called, there's no caching of results, and the new calculator in 4.5 is less efficient. As found in other apps it is usually because multiple calls are being made to the holidays() method using just a single date each time, resulting in repeated recalculations for the displayed date range. The interim solution is to use the new holidays() method that takes a date range and returns all the holidays, resulting in only a single calculation rather than 30-40. I'll have a look if there's any easy fixes here. In 4.6 I'll be adding shared caching of the calculated results which should resolve the issue fully. Hi John, Yes, this seems to be the case. The libraries I have installed at the moment are: kdepimlibs4 4.5.1-176.1 libkdepim4 4.4.6-239.1 libkdepimlibs4 4.5.1-176.1 I hope that I did not install anything I shouldn't have. (actually these were all installed via yast automatically when I switched to the Factory repo of opensuse. Thanks for looking into this. Regards Gabriel OK, that probably confirms it then. You've done nothing wrong, it's supposed to work OK that way. I've looked through all the uses of holidays() in KOrganizer and fixing it could be a little more invasive than I would like for a bugfix release, but the alternative of adding caching to KHolidays in a bugfix release is worse. I'll try code some fixes and run them past the kdepim reviewboard to see what people think. I made some fixes in 4.5, and even more fixes in trunk. Didn't backport anything to 4.4 though. I've prepared some fixes in the 4.5 branch to KODayMatrix, KOAgendaView, MonthView and ActionManager which should help. I forgot to test the response times in 4.5 before the changes, but it was snappy afterwards. However backporting to 4.4 conditional on KDEPIMLIB_VERSION didn't completely resolve the delays so the Working Days code is probably still an issue there and I don't see an easy/clean way to patch that. Instead I've gone back to trying to improve KHolidays performance by implementing an optimisation to only parse the file for the calendar systems actually used in the file, reducing most calls to only parsing the file once instead of 11 times. Testing with the kdepim 4.4 and kdepimlibs combination the response is snappy again so I'm hopeful this will resolve the issue. The fix will be in the 4.5.2 release scheduled for 2010-10-05. I'll post the 4.5 patches to ReviewBoard for comments anyway, then look at trunk to see if the patches are appropriate there. SVN commit 1175669 by jlayt: Improve efficiency of KHolidays by only parsing for required calendar systems. Backport of r1175645 CCBUG: 251127 M +23 -18 holidayparserdriverplan.cpp M +4 -0 holidayparserdriverplan_p.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1175669 SVN commit 1176162 by jlayt: Performance improvements to KOrganizer, use more efficient KHolidays calls See http://reviewboard.kde.org/r/5343/ CCBUG: 251127 M +6 -11 actionmanager.cpp M +12 -2 kodaymatrix.cpp M +11 -1 views/agendaview/koagendaview.cpp M +11 -1 views/monthview/monthview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1176162 I have installed KDE 4.6 pre and the problem seems to have been solved. Many thanks! Thanks! |