AnsweredAssumed Answered

Slow execution of Shared Calendar (fix included).

Question asked by Jobst Jobst on Oct 16, 2014
Latest reply on Oct 16, 2014 by Alex Nassi
The performance of the Shared Calendar in 6.5.16 and greater is real slow/bad, especially if you use this regularly and want to jump between weeks.

I have changed the following code in my installation and it works.

In the file modules/Calendar/CalendarActivity.php on line 182 there is the following code:

$where = self::get_occurs_until_where_clause($meeting->table_name, $meeting->rel_users_table, $view_start_time, $view_end_time, 'date_start', $view);

Replace that with the following code:

$where = self::get_occurs_within_where_clause($meeting->table_name, $meeting->rel_users_table, $view_start_time, $view_end_time, 'date_start', $view);

and your calendar will be quick again.


The first function call "get_occurs_until_where_clause" will lookup ALL activities UNTIL the "$view_end_time" while the second function call "get_occurs_within_where_clause" will lookup all activities between the "$view_start_time" and "$view_end_time" leading to a MUCH faster execution.

IMHO the second function call is the one that should be used.