creativetimofficial / ct-material-dashboard-pro-react

React version of Material Dashboard Pro
135 stars 27 forks source link

[Bug] Dashboard loading extremely slow #340

Open Anna728560 opened 2 months ago

Anna728560 commented 2 months ago

Version

2.2.0

Reproduction link

https://demos.creative-tim.com/material-dashboard-pro-react/?_ga=2.132089802.490423355.1717101685-399467964.1717101685#/pages/profile/profile-overview

Operating System

Windows/macOS

Device

Laptop

Browser & Version

OperaGx version isLVL 6 (core: 112.0.5197.100)

Steps to reproduce

  1. Open any page of the dashboard
  2. Wait for it to load
  3. Reload the page (it will load slowly) https://demos.creative-tim.com/material-dashboard-pro-react/?_ga=2.132089802.490423355.1717101685-399467964.1717101685#/pages/profile/profile-overview

    What is expected?

    The dashboard should load quickly (within a few seconds) and maintain a fast response time after logging out or refreshing the page.

    What is actually happening?

    The dashboard takes approximately 15 seconds to load initially. After interacting with the dashboard, such as logging out or refreshing the page, the slow loading time occurs again.


Solution

Investigate the potential causes for the slow loading times, such as large bundle sizes, inefficient network requests, or server-side performance issues. Optimize the loading process and consider implementing lazy loading or code splitting if not already in place.

Additional comments

I initially thought the issue might be related to my custom domain, but the same slow loading occurs with the official demo dashboard, indicating the issue might be with the dashboard itself rather than my configuration.

Anna728560 commented 2 months ago

There is a video showing the issue:

First, I opened my dashboard, and it took a long time to load. Then, I opened the official demo dashboard, waited for the page to load, and reloaded it. The loading was also slow. https://www.loom.com/share/60be1d281b23455cbfc730de3e7a4819?sid=a449378e-cc44-4854-b172-888f7704178f

gspsteve commented 2 months ago

The issue of slow loading is because of the reference to "https://api.nepcha.com" in "public\index.html" just remove the code below from index.html and the problem should be solved...

<script
      defer
      data-site="YOUR_DOMAIN_HERE"
      src="https://api.nepcha.com/js/nepcha-analytics.js"
    ></script>
Anna728560 commented 2 months ago

Thank you so much!