Groups | Blog | Home
all groups > dotnet performance > october 2004 >

dotnet performance : Best way - Dataset+cache or XML+cache or javascript ?


newyorkbombay1 NO[at]SPAM yahoo.com
10/21/2004 6:56:47 AM
I am trying to find the most efficient method for designing. We have
several pages with dependent dropdowns. Currently what we do is
whenever user selects item in one dropdown then we go to the database
to re-populate the values in the second and third dropdown. And when
user selects the second dropdown re-populate the third one by going to
the database again. Obviously this is not the efficient way. So I
decided to re-code that. I found out the following alternatives:
1. Store all the data of the three dropdowns into three dataset which
is further stored in the cache. This is done only once when the
webserver is started since the data to be shown in the dropdown is
just readonly. Bind the first dropdown to the first dataset. Whenever
user selects any item the first dropdown filter the second dataset
that is in the cache and show the corresponding data in the second
dropdown. and so on
2. do as above but store in the cache three xmlDataDocument objects
instead of dataset and use xpath to get the corresponding data.
3. Use client side javascript and xml just as in this example.
http://www.codeproject.com/aspnet/masterdetailddl.asp
This solution works on Netscape 6.0+ and IF 5.0+ which is fine.

The data in the dropdown is very less i.e. about 10 in the first 25 in
the second and 60 in the last
I did some tests myself and found that the 2nd one took the shortest
time.
Does anybody know of any other way or have any comments.

I am thinking of sessions also, but since this data is going to be the
readytohelp
10/21/2004 8:13:27 AM
Thanx David.
Yes after putting the relationship I found that they are much faster.
Any comments on the third point doing a client side one. It looks more
attractive since it does not make a trip to the server. I know there are
ways like remote scripting and webservices to access client side code
and have tried to test with those doesnt look bad.
Sachin



*** Sent via Developersdex http://www.developersdex.com ***
David Browne
10/21/2004 9:21:47 AM
[quoted text, click to view]

Option 1 easier, and should also be faster.
Have you established keys and relationships among the DataTables in the
DataSet?

David

newyorkbombay1 NO[at]SPAM yahoo.com
10/21/2004 11:38:13 AM
Thanx David.
Yes after putting the relationship I found that they are much faster.
Any comments on the third point doing a client side one. It looks more
attractive since it does not make a trip to the server. I know there are
ways like remote scripting and webservices to access client side code
and have tried to test with those doesnt look bad.
AddThis Social Bookmark Button