如何减少aspx页面上的处理时间? [英] How to reduce processing time on aspx page?

查看:74
本文介绍了如何减少aspx页面上的处理时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网格视图中,我正在检索包含4000条记录的数据.但是,这需要很长时间.将来我的记录数可能会更多.我该如何减少检索这么多记录的处理时间.

In a grid view I am retrieving data which consists of 4000 records. But it is taking very long time time. In future my number of records can be much more. How can I reduce processing time to retrieve so many number of records.

推荐答案

一件事是,您可以在gridview中使用分页.几个例子:
- GridView自定义分页 [使用ROW_NUMBER()分页GridView [带有PageSize更改下拉菜单的GridView自定义分页 [
One thing is that you can use paging with your gridview. Few examples:
- GridView Custom Paging[^]
- Paging GridView with ROW_NUMBER()[^]
- GridView Custom Paging with PageSize Change Dropdown[^]

Another thing is that you should also concentrate on proper indexing to make the paging and searching efficient. Also consider adding additional restrictive conditions (that user can modify) to your page.

The more you transfer data in one round trip the more time it''s going to take so the basic principle is to fetch only what''s needed at that moment.


我永远不会建议在GridView上显示4000条记录.这将不必要地减慢您的页面速度,作为最终用户,我真的不想一次看到4000条记录.为什么不使用自定义分页?为什么不对Grid View提供过滤?通过过滤,我的意思是显示与用户相关的数据.
I will never suggest to show 4000 Records on GridView. This will unnecessary slow your page and as a end user, I really don''t want to see 4000 records at a time. Why not using Custom Paging ? Why not providing filtering on Grid View ? By filtering I means, show the data which is relevant to user.


亲爱的朋友,

根据我的建议,在Gridview中使用数组概念插入数据.搜索数据将非常快.应用程序的执行将变得更加高效.


问候,
Anilkumar.D
Dear Friend,

As per My Suggestion while inserting data in Gridview Use Arrays Concept.Searching the Data will be Very Fast.Execution of Application will Become More Efficient.


Regards,
Anilkumar.D


这篇关于如何减少aspx页面上的处理时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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