dilipv Posted February 21, 2008 Posted February 21, 2008 hi there, i am new to this forum can anybody like to suggest , how to display and retive data more quickly.what to use datagrid or datareader, or creating xml file or what else we can do to get quicker. Any reply is most appreciated. Thank you Jitesh .Net Consulting Quote
Administrators PlausiblyDamp Posted February 23, 2008 Administrators Posted February 23, 2008 As a rule data readers will have lower overheads than datasets and can help improve performance. Other than that you will find tuning the sql itself will often give good performance i.e. only selecting the rows / columns you need, implementing your own paging logic etc. will often give bigger improvements over the simple choice between datareaders / datasets. It may be worth investigating the use of an O/R mapping tool to help streamline the actual data access code you are writing. As you are using asp.net it is also worth investigating the Cache object and out put caching - both of these can help remove database calls entirely, used sensibly they can be a good performance win. How are you displaying this information in your front end? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
dilipv Posted February 25, 2008 Author Posted February 25, 2008 hi there, Let me thank you for giving your valuable suggestion.i displaying data in the datadrid, but is it possible to display data in a simple table.so as to make my application much more quicker. but is this reliable one to do so. Thank you Jitesh Programmer Sharepoint Consulting Quote
Administrators PlausiblyDamp Posted February 25, 2008 Administrators Posted February 25, 2008 Depending on the version of .Net and exactly what you are trying to do will really make a difference here. The data grid in .Net 1 seems to be a lot more bloated than the GridView control in .Net 2 so if you are using .Net 2 try switching. Rather than creating the table through code though you might want to look at using either the DataList or Repeater control - these will give you more control over the HTML but still have an easy databinding way of doing things. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
travisowens Posted March 12, 2008 Posted March 12, 2008 Keep in mind, datareader's increase in speed also means it has reduced functionality, but if you don't need certain features you get from a dataset, then no loss. As far as speed, fastest to slowest: 1. ram 2. database server (even if it's running on a separate box) 3. xml file Keep in mind, storing a XML file and reading it into ram is slow that querying the database, because you have to do #3 and then do #1. I once benchmark compared a system I wrote (before .NET) that would read .HTML templates off the harddrive, and when I put the HTML text inside a database table, I could read the database 8x faster than a .HTML file off the HD. Of course 8x faster than microscopic is still microscopic, I didn't use the "template in a database" code because it was seriously more complex to alter a template inside a column vs simply editing a .HTML file on the drive. It would only be an acceptable trade-off when you're dealing with millions of hits (Amazon, eBay). As a beginner, don't always go the fastest route, keep things good and flexible, don't forget the KISS rule. Also, if you read into Yahoo's research, only 5% of the total time it takes a webpage to draw is spent on your server code, the other 95% is spent on parsing your HTML/JS/CSS so spend your time outputting great HTML if you want speed improvements. Explaining that is far beyond the scope of this thread. Quote Experience is something you don't get until just after the moment you needed it
Administrators PlausiblyDamp Posted March 14, 2008 Administrators Posted March 14, 2008 While you mentioned Yahoo... http://developer.yahoo.com/yslow/ is a nice little tool if you are running Firefox as your browser of choice, it will show you potential performance issues with the html and suggest improvements for a lot of them. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.