当我们有大量记录时,如何提高asp.net中页面加载的性能? [英] how can improve performance of page load in asp.net when we have large records?

查看:114
本文介绍了当我们有大量记录时,如何提高asp.net中页面加载的性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一页我根据数据库中的一些不同数据创建了自定义表。查询执行时间不成问题,查询在0秒内返回超过5000条记录,现在根据不同的条件我们生成三个表,使用for循环在页面上显示这些记录。我正在使用devexpress xtrareport工具,我通过从for循环创建行来绑定数据,这将花费很长时间,最后我们得到错误请求超时。

Hi all,

i have one page where i have created custom tables based on some different data from the database. query execution time is not issue, query returns more then 5000 records in 0 seconds, now based on different condition we are generating three tables using for loop to display these records on page. i am using devexpress xtrareport tool where i bind data by creating rows from for loop and this is taking forever time and at the end we got error request time out.

推荐答案

Web不是为显示大型数据集而设计的。你必须问一个问题,5000条记录的列表是多么有用?



就个人而言,我会再看一下这个问题并寻找更加横向的解决方案,例如添加搜索或分页功能。



但是,如果您不确定延迟在哪里,那么您需要个人资料你的代码。



VS premium和ultimate都包括分析工具,它们会突出代码中的问题区域。



如果您没有这些版本,请尝试使用RedGate的AntsProfiler。有一个免费试用版。但如果你喜欢,请购买。
The web is not designed for displaying large datasets. You have to ask the question how useful is a list of 5000 records?

Personally I'd take another look at the problem and look for a more lateral solution such as adding search or pagination features.

But that said, if you're unsure where the delay is then you need to profile your code.

VS premium and ultimate both include profiling tools which will highlight the problem areas in your code.

If you don't have these editions try AntsProfiler from RedGate. There's a free trial. But please buy it if you like it.


这篇关于当我们有大量记录时,如何提高asp.net中页面加载的性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆