Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • Administrators
Posted

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?

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

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

  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

  • 3 weeks later...
Posted

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.

Experience is something you don't get until just after the moment you needed it

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...