how to make my application .NET faster?

I have a application web in C#.NET, I put multiple GridViews and i think that it`s the reason that my applicaciont is so slow, My question is...

is there anyway to make my application faster without removing Grids?
LVL 1
tenriquez199Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
radcaesarCommented:
Remove view states on server controls

Enable connection pooling

Use Caching

And many more, Here is one from MS (I cant recall all :) )

http://msdn.microsoft.com/en-us/library/ms973839.aspx

0
 
anarki_jimbelCommented:
It's hard to say without knowing details but... I believe grid views themselves are not a big problem. Reckon you need to fill them with data... And this data comes from a database. And here I guess is the problem - might be too complex queries or not optimized database. Also, if you use dataAdapters etc it works pretty slow. You may need to consider using datareaders etc. See:

http://stackoverflow.com/questions/1676753/sqldataadapter-vs-sqldatareader
http://www.vbforums.com/showthread.php?t=554404
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
Hi, it is possible. How to retrieve all the data into gridview in your application. It is require to use stored procedures and if you want to display data only then use the datareader, not dataset or datalist.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
b_levittCommented:
I would start with anarki's suggesting of looking at the database query time first.  Even simple fixes like adding ndexes can improve performance by several orders of magnitude.  Execute your queries by them selves (Query analyzer or SSMS if this is sql server to see how long your queries take).

I would also look at the size of the data being returned.  A large data set over a slow network (from the db server to the web server OR from the web server to the client) is another obvious bottle neck.  If you have no choice but to return a large dataset to the client, it may be a good idea to follow radcaesar's suggestion of disabling viewstate on the grid or other large databound controls (drop down lists for example).  However, doing this in general is overkill.  If the http response to the client is really that large, enable http compression on your web server instead.  To analyze the http response, try Fiddler: www.fiddler2.com.

Caching is also a good suggestion, but is only effective on subsequent hits, so if the data or query is changing it won't do you much good.  You can read about caching here: http://msdn.microsoft.com/en-us/library/xsbfdd8c.aspx

Datareaders are faster in terms of raw speed.  However, there are a number of reasons why you might NOT want to use them over datasets:
1.) The improvement can be modest relative to the entire execution.
2.) Datareader's speed is at the cost of database concurrency.  If you are not closing your readers very quickly, they can create scalability problems as user loads increases.
3.) While datasets aren't a great return type for a middle teir, they're better than a datareader.  Passing a datareader out of a method and expecting the caller to close it is not a very good design.

Contrary to popular belief, there is NO performance gain from using stored procedures over inline code (at least not in sql server).  This is not to say using stored procs is a bad idea, but the only thing they'll save you is a couple of bytes in backend network traffic.

0
 
sarabhaiCommented:
what datagrid dispaly and is it used paging.
0
 
cojdevCommented:
use fiddler or YSlow addin for Fire Fox to determine where the bottle neck is. Once you know what is slow or what the application is doing begtween the client and the server you can widdle down the time.

http://www.fiddler2.com/fiddler2/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.