Bug 2546 - Recurring event in the vcalendar plugin makes claws mail start extremely slowly
Summary: Recurring event in the vcalendar plugin makes claws mail start extremely slowly
Status: NEW
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Plugins/vCalendar (show other bugs)
Version: 3.7.10
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
: 2740 2886 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-21 14:24 UTC by Charles-H. Schulz
Modified: 2014-03-04 12:27 UTC (History)
5 users (show)

See Also:


Attachments
recurring event template (419 bytes, application/xml)
2013-08-07 12:21 UTC, Snowman
no flags Details
vCalendar template file for recurring event (679 bytes, text/plain)
2013-08-07 18:21 UTC, Snowman
no flags Details
fix freezes workaround (1.59 KB, patch)
2013-08-07 21:38 UTC, Snowman
no flags Details | Diff

Description Charles-H. Schulz 2011-11-21 14:24:55 UTC
When using the vcalendar plugin the creation or the subscription of a recurring event creates two unwanted symptoms:
-each time claws mail starts it takes for ages (like 1 full minute or even more) to see the list of mailboxes and folders to appear. In fact launching claws-mail --debug clearly shows the calendar plugin loading a sort of long list of events

- after having started claws if one goes to the calendar it will take yet more time to display the calendar itself on the screen.

NB: after having canceled the recurring event all the symptoms disappear.
This issue has been observed on two systems running Arch Linux and Gnome 3 on x86_64. 

For reference the enhancement asking for the implementation of recurring events in the calendar plugin is the bug #2124.
Comment 1 Paul 2012-10-06 08:08:15 UTC
*** Bug 2740 has been marked as a duplicate of this bug. ***
Comment 2 Colin Leroy 2012-10-10 09:47:25 UTC
Can you attach such a recurring event ?
Comment 3 Paul 2013-04-13 09:47:34 UTC
*** Bug 2886 has been marked as a duplicate of this bug. ***
Comment 4 Snowman 2013-08-07 12:21:36 UTC
Created attachment 1287 [details]
recurring event template

replace the value of "event/answer/attendee" with one of you own e-mail and place it in ~/.claws-mail/vcalendar/

this recurring event creates dayly meeting at 09:00UTC and an hour duration
Comment 5 Snowman 2013-08-07 13:40:18 UTC
this annoying freezing also occur every some minutes if you turn on alerts for events in preferences even you are not working with vCalendar at this time, for example when you are compose a new message or just write a reply

the reason is the nonoptimal routine vcal_get_events_list() which recreates 100 occurence-files for every recurring event at every call, also it saves backup file for each one (by using function developed for prefs controlling)

it takes a huge amount of time at:
— the starting of the app
— the entering into calendar folder
— every time claws-mail checks if it's time to alert a close event

number of occurences of the recurring event (100) is hardcoded in sources, but what can I do if I need more instances?

is it time to refactoring this strange code? ;)
Comment 6 Snowman 2013-08-07 18:21:23 UTC
Created attachment 1289 [details]
vCalendar template file for recurring event

attaching new standard vcal instead of previously xml-file cause it's internal representation

1. replace template e-mail in this file ("ATTENDEE:user@localhost") with your own address
2. send the file as attachment to yourself; choose mime-type "text/calendar" for this one
3. push button "Answer" (with "Accept" Action) on the vcal in received message
Comment 7 Snowman 2013-08-07 21:38:41 UTC
Created attachment 1290 [details]
fix freezes workaround

after some digging I've made a patch which reduce frequency of freezing times;
it recreates occurrences of the recurring event not so often, but only:
— at application start;
— in a day (24 hours) after previously one

this helps to escape freezes at entering in calendar folder and at every check for alerts

it still freeze at start;
and it adds a side effect: while accepting a new recurrent event all occurrences (except original) appears in program only after 24 hours or after restarting claws-mail

it works for me (claws-mail-plugins-vcalendar-3.9.2-3.fc19.x86_64) but this just workaround and I hope that the developers will fix it correct

Note You need to log in before you can comment on or make changes to this bug.