If this is your first visit, check our documentation. To post, register or login.
Forums / Basic Configuration / Excessive Admin Loading Time

Excessive Admin Loading Time

Started by dave224 on 10 Apr 2021, 1:16 PM · Views: 4,050

Results 1 to 7 of 7
10 Apr 2021, 1:16 PM
#1
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Excessive Admin Loading Time

I'm experiencing excessive loading times for admin after entering credentials and clicking submit. Times of two to three minutes are common. Occurs on my development system and live test system. The main culprit appears to be gstatic.com which is loaded in index_dashboard.php and stats_sales_report_graphs.php. Is anyone else seeing this behavior?

Although not a major contributor to loading times, there are many javascript files loaded such as jquery-3.5.1.min.js, jquery-ui.min.js, jquery-ui-i18n.min.js, jAlert.min.js, jTimeout.min.js, and bootstrap.min.js. Are any of these redundant and could be eliminated?

Dave

10 Apr 2021, 2:45 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Excessive Admin Loading Time

That long load-time can be exacerbated if you have multiple plugins that are 'calling home' to see if there is a more recent version available
(think SiteMap XML, for instance).

Combined with the setting for My Store :: Show if version update available (which also performs that look-up), that can be quite the extension to the login time.

10 Apr 2021, 5:07 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Excessive Admin Loading Time

Here's another fix you can backport to your version:
https://github.com/zencart/zencart/pull/4172

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

13 Apr 2021, 1:23 PM
#5
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: Excessive Admin Loading Time

Thanks everyone for the hints.
Dave

13 Apr 2021, 3:09 PM
#6
lindasdd avatar

lindasdd

Zen Follower

Join Date:
Jun 2007
Posts:
474
Plugin Contributions:
0

Re: Excessive Admin Loading Time

Even though it is a neat addition, I find the admin dashboard (but not all admin pages) causes a lot of load lag.

One thing to test is if you remove most of the dashboard does the page load delay go away (just don't tell swguy I made that suggestion).

To test whether the issue is with certain dashboard contents, try changing admin/index_dashboard.php to just:

<?php
/**
 * @copyright Copyright 2003-2020 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: Erik Kerkhoven 2020 Jun 17 Modified in v1.5.7 $
 */

if (empty($currencies)) {
    require_once DIR_WS_CLASSES . 'currencies.php';
    $currencies = new currencies();
}

?>
<!doctype html>
<html <?php echo HTML_PARAMS; ?>>
  <head>
    <?php require DIR_WS_INCLUDES . 'admin_html_head.php'; ?>
    <!--Load the AJAX API FOR GOOGLE GRAPHS -->
    <script src="https://www.gstatic.com/charts/loader.js" title="google_graphs_api"></script>
    <style>
      /* #coltwo div.row span.left { float: left; text-align: left; width: 50%; white-space: nowrap; }*/
      #colthree div.row span.left { float: left; text-align: left; width: 50%; white-space: nowrap; }
      #div.row span.center { margin-right: 30px; }
      .indented { padding-left: 5%; margin-right: 5%;}
      div.first { float: left; width: 90px; }
      div.col { float: left; width: 18%; }
    </style>
  </head>
  <body class="indexDashboard">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->

    <?php
    $notifications = new AdminNotifications();
    $availableNotifications = $notifications->getNotifications('index', $_SESSION['admin_id']);
    require_once(DIR_WS_MODULES . 'notificationsDisplay.php');
    ?>

    <div id="colone" class="col-xs-12 col-sm-6 col-md-4 col-lg-4">



    </div>
    <div id="coltwo" class="col-xs-12 col-sm-6 col-md-4 col-lg-4">



    </div>
    <div id="colthree" class="col-xs-12 col-sm-6 col-md-4 col-lg-4">



    </div>
13 Apr 2021, 5:33 PM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Excessive Admin Loading Time

lindasdd:

One thing to test is if you remove most of the dashboard does the page load delay go away (just don't tell swguy I made that suggestion).

LOL. Don't hesitate to make a change on my behalf! Make a backup and go for it!

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.