Major performance improvements to the Dashboard and Calendar views
* Close the PHP session for writing as early as possible in most AJAX calls for those views * Reduce the number of roundtrips to the server in both the Dashboard and Calendar views by putting the data in our HTML response (this makes a massive difference) * Eliminated a couple of unneccessary AJAX calls * Use lazy loading in full calendar * Fixed a bug in the week view that only occurs near the end of the week (date->gmdate bug!)
This commit is contained in:
parent
b49e98693b
commit
34de6da2c7
10 changed files with 48 additions and 16 deletions
|
@ -1446,9 +1446,9 @@ SQL;
|
|||
}
|
||||
|
||||
public static function getStartEndCurrentWeekView() {
|
||||
$first_day_of_calendar_week_view = mktime(0, 0, 0, date("n"), date("j"));
|
||||
$first_day_of_calendar_week_view = mktime(0, 0, 0, gmdate("n"), gmdate("j"));
|
||||
$weekStart = Application_Model_Preference::GetWeekStartDay();
|
||||
while (date('w', $first_day_of_calendar_week_view) != $weekStart) {
|
||||
while (gmdate('w', $first_day_of_calendar_week_view) != $weekStart) {
|
||||
$first_day_of_calendar_week_view -= 60*60*24;
|
||||
}
|
||||
$last_day_of_calendar_view = $first_day_of_calendar_week_view + 3600*24*7;
|
||||
|
@ -1460,7 +1460,7 @@ SQL;
|
|||
}
|
||||
|
||||
public static function getStartEndCurrentDayView() {
|
||||
$today = mktime(0, 0, 0, date("n"), date("j"));
|
||||
$today = mktime(0, 0, 0, gmdate("n"), gmdate("j"));
|
||||
$tomorrow = $today + 3600*24;
|
||||
|
||||
$start = new DateTime("@".$today);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue