how to improve performance ?

  • Thread starter Joe Abou Jaoude
  • Start date
J

Joe Abou Jaoude

hi,

I m using a datagrid with AutoGenerateColumns="false",
and a template column composed by a checkbox and a label bound to the
database.
However in some cases, the query returns more than a thousand records
which make the display very very slow to dislay.
Of course one of the options is using pagination, although this decision
is not in my authority (i can only suggest)...
so I was thinking what could be some other options that can improve the
performance.

What i tought of, is using an htmlTable and adding the rows dynamically
by iterating through a datatable or a datareader (whatever is faster). I
thought this would be faster and also would make the web page size
smaller since the datagrid uses big names like
"MyDataGrid__ctl83_Label1"
Does anyone have an idea about if that would be a good solution or not?

my second question: the html page size is reaching 700-800 KB, which is
huge i guess. Is there a page size that it's not recommended to exceed
and what is it ?

Any information would be appreciated
regards
 
B

Brock Allen

What i tought of, is using an htmlTable and adding the rows
dynamically
by iterating through a datatable or a datareader (whatever is faster).

Nope -- this is essentially what the DataGrid' already doing for you. If
you (or your boss) wants to show thousands of rows on a page, then this is
the behavior you're going to see.
my second question: the html page size is reaching 700-800 KB, which
is huge i guess. Is there a page size that it's not recommended to
exceed and what is it ?

It's too big when your users think that your page is slow to load (assuming
size of the page causes the slow load time).
 
E

Elton Wang

To set the datagrid's EnableViewState to false can improve
its performance. But if you want its pagingation, it's
better to turn on its viewstate, unless you implement your
own paging logic.

HTH

Elton Wang
(e-mail address removed)
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top