本文介绍了如何在加载仪表板时减轻服务器的负担的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用devexpress和MVC在仪表板应用程序上创建。



装载仪表板需要将近10分钟。



我创建数据提取以压缩sql数据源并将其分配给仪表板数据源。



在更新仪表板时,我在global.asax.cs中编写了一个方法。



我的服务器上有22万条记录。 。



检索记录时需要花费更多时间。



如何提高性能?网站减轻了服务器的负担?



这里我使用的是java脚本。



建议我是一个解决方案。



谢谢。



我尝试过:



Hi,

I have created on dashboard application using devexpress and MVC.

On loading the dashboard it takes nearly 10 minutes.

SO I created data extracts to compress sql data source and assigned it to dashboard data source.

On updating the dashboard I have written one method in global.asax.cs.

There are 22 lakhs records fetching to my server..

While retrieving that records it is taking more time.

How should i increase performance of the website by reducing the burden on the server?

Here I am using java script.

Please suggest me a solution.

Thank you.

What I have tried:

protected void UpdateExtract(string dashboardId)
        {
            try
            {
                using (Dashboard newDashboard = new Dashboard())
                {
                    using(Dashboard Dashboard1=new Dashboard())
                    {
                        newDashboard.LoadFromXml(Server.MapPath(string.Format(@"~/App_Data/Dashboards/{0}.xml", dashboardId)));
                        Dashboard1.LoadFromXml(Server.MapPath(string.Format(@"~/App_Data/Dashboards/SQL/{0}.xml", dashboardId)));
                        var dataSour = Dashboard1.DataSources.OfType<DashboardSqlDataSource>().ToArray();
                        //DashboardSqlDataSource extractDataSource = new DashboardSqlDataSource();
                        foreach (DashboardSqlDataSource datr in dataSour)
                        {
                            datr.Fill();
                        }
                        var dataSources = newDashboard.DataSources.OfType<DashboardExtractDataSource>().ToArray();
                        foreach (DashboardExtractDataSource dataSource in dataSources)
                        {
                            dataSource.ExtractSourceOptions.DataSource = dataSour[0];
                            dataSource.UpdateExtractFile();
                        }
                    }
                  
                }
            }
            catch (Exception Ex) { }
        }

推荐答案



这篇关于如何在加载仪表板时减轻服务器的负担的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 15:01