I need to create an ASP.Net application that deals with large amount of data, and performance is really important.
-
Is it a good idea to use ASP.Net controls such as GridView, RepeatControl, SQLDataSource, etc? Are these elements designed to perform well, or am I gonna lose performance to use pre-made and easy-to-use elements?
-
Which one is the proper way to deal with data? Creating a business layer and use business objects to populate form? or use the DataTable and DataSets directly?
-
Please give me some tips that is going to help with performance?
The biggest single piece of advice I would give is to first build your application using good programming practices, and then use a profiler to see what is taking the most time in your application. If you start out trying to make everything go as fast as possible you will waste all your time on things that don’t really matter. On the other hand, if you start out making your code maintainable and following SOLID principles, you will find that it is easy to make drastic improvements by changing just a few pieces of code.
It is also important for you to define just what your targets are in terms of performance. At what point does a page load “fast enough?” Strive to make your performance targets, but don’t go overboard in trying to shave 10 more milliseconds off an operation that users will only do once per month.
That said, you will find that the biggest time wasters are:
Here are a few general tips to optimize the items listed above:
One last minor thing to consider is that the next version of Entity Framework will automatically cache compiled queries, which will make most queries significantly faster without any extra work on your part.