Bug 166771 - Very slow when switching months in month view
Summary: Very slow when switching months in month view
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: monthview (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
: 180598 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-16 21:47 UTC by Maarten Wisse
Modified: 2009-01-14 00:29 UTC (History)
4 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 Maarten Wisse 2008-07-16 21:47:29 UTC
Version:            (using KDE 4.0.98)
Installed from:    Compiled From Sources
Compiler:          gcc 4.1.2 
OS:                Linux

Korganizer is _much_ slower than 3.5.x in the month view, especially going forward and backward between months. On my CoreDuo, it takes about 4 seconds to switch to the next month, no matter how many data there are in that month. This must be a bug somewhere. It is independent from OpenGL effects.
Comment 1 Wouter Haffmans 2008-07-18 17:44:09 UTC
I experience the same problem, but also in day/week view. Updating the small calendar in the top left corner is also slow, takes several seconds to update on every change of view (the week view itself seems to update itself quicker, but still fairly slow). Building up the UI/view in general seems sluggish. When applying new settings from the configuration it slowly adds each resource (I have 9 calendars in remote files, webdav) before closing the settings dialog, taking about 2 seconds for each calendar (AMD Athlon64 3200+, running 32 bit Gentoo).

Output gives a lot of "korganizer(10075)/kdepimlibs (kcal): Cannot read uid map file ' "/home/cheetah/.kdesvn/share/apps/kcal/uidmaps/remote_Akrz5V4gDY" ' " errors (the resource ID being different for each calendar), but nothing else. The uidmaps directory exists, but the requested files do not. Not sure if this is related.

Not sure if it is a related issue, but I have a nVidia GeForce 6600GT (proprietary driver, 177.13), compositing (OpenGL) enabled. I haven't used any configuration tweaks to speed up nvidia performance yet.
Comment 2 Maarten Wisse 2008-07-18 18:58:35 UTC
It is definitely _not_ compositing related, as it happens also with compositing switched off. Moreover, I'm on intel and compositing is very smooth on my box.
Comment 3 Christoph Neuroth 2008-07-29 20:32:06 UTC
I can confirm this with intel onboard chip and no compositing/desktop effects stuff on 4.1
Comment 4 Wouter Haffmans 2008-08-03 15:39:28 UTC
Switching seems quicker again for me (trunk built last night). Seems to me like this bug is fixed.
Comment 5 Allen Winter 2008-08-03 15:47:05 UTC
Yes, we did commit some speedups yesterday which will be available in KDE 4.2 and KDE 4.1.1

I'm not closing this bug yet though because:
1) I still think the month view is too slow
2) there's more that can be sped up in the agenda view too
Comment 6 Maarten Wisse 2008-08-05 20:01:34 UTC
Better change it to 'NEW' if the bug is recognized.
Comment 7 George Goldberg 2008-09-28 23:40:06 UTC
In svn trunk r865619, going backwards and forwards in the month view still takes several seconds each time (no compositing, nvidia and intel graphics chips).
Comment 8 Sergio Martins 2008-12-08 23:31:03 UTC
Does anyone who has slow switching see any warnings when running korganizer in a terminal.

Warnings like these:

korganizer(31354)/kdepimlibs (kcal) KCal::Event::dtEnd: Warning! Event ' "foo bar" ' has neither end date nor duration.

I see hundreds of them every time i switch months, i guess its a faulty calendar file.

I obtained it by exporting, in kde3
Comment 9 Sergio Martins 2008-12-21 19:53:45 UTC
SVN commit 899875 by smartins:

Don't call Calendar::events(KDateTime dt) for each day.
Instead, call Calendar::events(KDateTime start, KDateTime end) just once.

This takes care of performance problems in KODayMatrix::updateEvents().

CCBUG: 166771



 M  +40 -18    kodaymatrix.cpp  
 M  +2 -4      kodaymatrix.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=899875
Comment 10 Sergio Martins 2008-12-22 01:35:44 UTC
SVN commit 900026 by smartins:

Use Recurrence::timesInInterval() instead of Incidence->recursOn() for each day.

Fixes performance problems with month switching.

CCBUG: 166771



 M  +31 -7     monthview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=900026
Comment 11 Sergio Martins 2008-12-22 01:40:38 UTC
Guys,

If you're using korganizer from svn/trunk please update and give feedback, for me this is fixed.
Comment 12 Thomas Thrainer 2008-12-22 08:02:42 UTC
Hi there,

Although I have no time to test, I've got an idea how you could further speed things up:
I implemented scrolling in the "old" monthview (it's somewhere in svn, but was never released as such because of the "new" monthview coming along). There, while scrolling, only the newly scrolled-in week(s) were updated instead of the whole month, because the other days are already up-to-date and simply were moved up/down.
I don't know if it actually improved performance dramatically but it could definitely help a bit. But I think in the new monthview implementing this would be quite some work, because it's not really easy to move the contents of one day to another as there are several data structures concerned.

Cheers,
Thomas
Comment 13 Sergio Martins 2008-12-24 04:44:17 UTC
Thanks for the help Thomas, I already got two others users to test this and they confirm it's fixed.

I profiled the code and removed all bottlenecks.

Switching months was taking 4 seconds, now it takes 40 milliseconds, so I think it's safe to close this one :)

Comment 14 Christophe Marin 2009-01-14 00:29:33 UTC
*** Bug 180598 has been marked as a duplicate of this bug. ***