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
|
@ -19,6 +19,23 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||
})(window,document,'script','dataLayer','GTM-55N6NH');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
||||
<script type="text/javascript">
|
||||
//Awful hack to speed up loading - Embed the schedule in the response so that the dashboard
|
||||
//doesn't have to make a separate AJAX request to get this data.
|
||||
var schedulePreLoaded = <?php
|
||||
require_once("ScheduleController.php");
|
||||
$front = Zend_Controller_Front::getInstance();
|
||||
$foo = new ScheduleController($front->getRequest(), $front->getResponse());
|
||||
$foo->getCurrentPlaylistAction();
|
||||
echo(json_encode($foo->view));
|
||||
?>;
|
||||
parseItems(schedulePreLoaded.entries);
|
||||
parseSourceStatus(schedulePreLoaded.source_status);
|
||||
parseSwitchStatus(schedulePreLoaded.switch_status);
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php echo $this->partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?>
|
||||
<div id="Panel">
|
||||
<div class="logo"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue