datagrid too slow

  • Thread starter Jennyfer J Barco
  • Start date
J

Jennyfer J Barco

In my application I have a datagrid. The code calls a Stored procedure and
brings like 200 records. I created a dataset and then a dataview to bind the
results of the query to my grid using MyGrid.DataBind() Once the
records are loaded, to handle the next, previous button is too slow. I have
in the same screen OptionsBox and everytime I click in any option I show
some text fields in the screen. Anything the user does is very slow. When my
query returns less than 100 records everything is fast but when I load more
records in the datagrid is slow. If this is in memory why is it so slow? In
real time application I will bring more than 1000 registers and this can';t
be so slow.

This definitions I'm doing only once in the code
Dim myds As New DataSet

Dim mydv As New DataView

What can I do to improve and make it fast? I've work with VB 6.0 and once
the info. is loaded in the grid it was so fast not like the machine is
thinking a lot



Thanks in advance

Jennyfer
 
R

Raterus

It doesn't sound like the bottleneck here is asp.net, but your stored procedure. I'd ensure you are doing good coding practices there, and also make sure you have optimized how the data is being stored in sql server. (primary keys set, indexes?) You could write books on that kind of optimization though.
 
J

Jennyfer J Barco

The first time it loads the page, it calls the sp and is bringing the info.
very fast. The grid appears so fast. The thing is that if there are many
records in the grid working with the controls is very slow. Making a
Options_SelectedIndexChanged which is an option radiobuttonlist is very
slow. When I bring to the datagrid a few records executing this
Options_SelectedIndexChanged is very fast. I traced the program and I know
calling the SP and doing the databind is not slow even if he is returning me
thousands of records. It's when I load many records in the grid the problem.
In the Page_Load I call the SP only when is not Ispostback which means the
first time because I know .NET runs the page_load everytime you do anything
like moving to the next page or select an option in the radiobuttom.

Thanks

It doesn't sound like the bottleneck here is asp.net, but your stored
procedure. I'd ensure you are doing good coding practices there, and also
make sure you have optimized how the data is being stored in sql server.
(primary keys set, indexes?) You could write books on that kind of
optimization though.
 
J

Jennyfer J Barco

Do you have any idea of this? The problem is not the sp that brings the
data, it's very fast. The problem is when I load hundreds of records. Isn't
this design to work with a lot of information?

Thanks and help please

Jennyfer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top