Bug 243472 - Changing the day to show uses 100% cpu
Summary: Changing the day to show uses 100% cpu
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: calendar (show other bugs)
Version: 4.5 pre
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-03 00:27 UTC by Søren Holm
Modified: 2010-07-31 23:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
korganizerrc that makes my cpu go wild when changing date (1.24 KB, application/octet-stream)
2010-07-30 23:04 UTC, Søren Holm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Søren Holm 2010-07-03 00:27:46 UTC
Version:           4.5 pre (using Devel) 
OS:                Linux

When clicking on a day in the small month-view in the top left corner to change what day to show, kontact uses 100% cpu for two seconds or so until the currently showed day actually changes.

In KDE SC 4.4.5 the change occours immediately without high cpu usage.

Reproducible: Always

Steps to Reproduce:
1. click on a day in the small month-view 
2. click on another day in the small month-view 

Actual Results:  
Notice the long time it takes to change day between step 1 and 2.

Expected Results:  
The change should occour immediately without high cpu usage.
Comment 1 Søren Holm 2010-07-29 19:59:58 UTC
This still occurs in KDE SC 4.5.0 rc2

Can someone please verify and confirm. It renders korganizer unusable to browse past and future months.
Comment 2 Sergio Martins 2010-07-30 01:57:29 UTC
How many events do you have?

Wich calendar type? Ics file?

Wich view are you in? Day, work, month? (day i suppose)
Comment 3 Søren Holm 2010-07-30 12:24:34 UTC
After deleting korganizerrc the behavior stopped .... I should have saved the file so we could see what caused it.

Thanks for the reply anyway.
Comment 4 Søren Holm 2010-07-30 23:04:26 UTC
Created attachment 49698 [details]
korganizerrc that makes my cpu go wild when changing date
Comment 5 Søren Holm 2010-07-30 23:09:33 UTC
I think this bug should be reopened. Deleting korganizerrc is a workaround, but users upgrading from 4.4.x will experience this problem.
Comment 6 Sergio Martins 2010-07-31 00:26:26 UTC
Can you answer comment #2 ?
Comment 7 Søren Holm 2010-07-31 00:37:52 UTC
Sergio: Removing all calendars does not resolve it, so I am guessing that is nothing to do with the actual content of the calendar.
Comment 8 Søren Holm 2010-07-31 01:05:27 UTC
I found out what is wrong. Setting the holyday region to something else than "none" triggers the high cpu usage when changing date.
Comment 9 Sergio Martins 2010-07-31 21:47:03 UTC
SVN commit 1157649 by smartins:

Call HolidayRegion::holidays( start, end ) once, instead of calling HolidayRegion::holdays( date ) 42 times.

Saves almost 2 seconds when using the date navigator.

BUG: 243472




 M  +4 -1      kodaymatrix.cpp  
 M  +24 -6     koglobals.cpp  
 M  +10 -0     koglobals.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1157649
Comment 10 Søren Holm 2010-07-31 23:31:43 UTC
Sweet :D