如何使您的asp.net网页轻量级 [英] how to make your asp.net web page lightweight

查看:65
本文介绍了如何使您的asp.net网页轻量级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i正在构建一个Web应用程序,但是在加载和获取数据库时需要花费太多时间,如何解决这个问题


i am building a web app but it takes too time in load and fetching database , how to solve this problem

推荐答案

有很多地方可能导致减速。如果可以提高数据速度,则需要了解如何获取数据,有多少数据。等等
There are many places that can cause slow down. You'll need to look at how you are fetching data, how much of it, if you can improve that speed. Etc, etc.


你可以做以下事情。我甚至不知道多少技巧



1.)使用存储过程。

2.)对于重图像使用通用图像处理程序。

3.)尽量使用HTML控件,因为它们重量轻。

4.)缓存是你可以做的最重要的事情之一。 br />
5.)正确的3层体系结构非常重要。

6.)使用更新面板,避免完整的回发。

7.)如果没有必要检查你控制AutoPostBacks是否关闭。

8.)如果你有能力使用ajax调用非安全数据。

9.)最重要的是你应该有好处托管环境。

10.)使用Classes和ArrayLists而不是返回SqlDataReader。

11.)大多数时候使用SqlDataReader,好像将数据放在一个单独的大块。



等....
You can do following things. I even don't know much techniques

1.) Use stored procedures.
2.) For heavy images use generic image handler.
3.) Use HTML controls as much as you can ,as they are light weight.
4.) Caching is one of the most important thing you can do.
5.) Proper 3 tier architecture is quite important.
6.) Use Update panel ,avoid full post backs.
7.) If not necessary check that you controls AutoPostBacks are off.
8.) If you are capable use ajax calls for non secure data.
9.) Most important you should have good hosting environment.
10.) Use Classes and ArrayLists as opposed to returning an SqlDataReader.
11.) Use SqlDataReader most of the times ,as if brings data in a single chunk.

etc....


这篇关于如何使您的asp.net网页轻量级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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