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:
Albert Santoni 2015-03-13 18:22:27 -04:00
parent b49e98693b
commit 34de6da2c7
10 changed files with 48 additions and 16 deletions

View file

@ -37,6 +37,7 @@ class UsersettingsController extends Zend_Controller_Action
public function setLibraryDatatableAction()
{
session_write_close();
$request = $this->getRequest();
$settings = $request->getParam("settings");
@ -45,6 +46,7 @@ class UsersettingsController extends Zend_Controller_Action
public function getLibraryDatatableAction()
{
session_write_close();
$data = Application_Model_Preference::getCurrentLibraryTableSetting();
if (!is_null($data)) {
$this->view->settings = $data;
@ -53,6 +55,7 @@ class UsersettingsController extends Zend_Controller_Action
public function setTimelineDatatableAction()
{
session_write_close();
$request = $this->getRequest();
$settings = $request->getParam("settings");
@ -61,17 +64,11 @@ class UsersettingsController extends Zend_Controller_Action
public function getTimelineDatatableAction()
{
$start = microtime(true);
session_write_close();
$data = Application_Model_Preference::getTimelineDatatableSetting();
if (!is_null($data)) {
$this->view->settings = $data;
}
$end = microtime(true);
Logging::debug("getting timeline datatables info took:");
Logging::debug(floatval($end) - floatval($start));
}
public function remindmeAction()