Re: Error executing version of Net Framework



Thanks Steven,

Steven wrote,
------------------
Currently, what you've tried is

** postback the page whenever a user select a item in listbox and query the
database and set the queried value to textbox

** still postback the page whenever a user select a certain item in
listbox, but instead of getting description by querying the backend
database, you read the cached DataSet(in server memory) for data,
-------------------------------------------------

Yes those are what I did.

I have been research on this topic about performance for web application.
Some of the suggestions are:

A. Microsoft suggest not to use "AutoeventWireup"
B. Client Scripting
C. Caching
D. ....
E. ......

A. Autoeventwireup
Microsoft suggest not to use autoeventwireup because
the code will be executed twice. One by NET and one by VS.
The problem: if I set this to false then all the code on Page_load are
not executed.

B. Client scripting.
I understand the reason.

C. Caching

Steven wrote,

Also, for server-side caching, are you using the ASP.NET Cache storage? I
suggest you cache the datatable for records of each country (but set a
expire timeout). Thus, whenever your page postback to query descrption of a
record, you always try looking up the Cache(for the DataTable that mapped
to a certain country). if cache is empty, you query backedn db to fullfil
the cache. for such cache scenario, it will add memory presure of the
server machine, however, we have to make the choice whether we should
improve the response time or memory usage.

( Thanks Steven. I just realized the mistake, I did not cache it.)
----------------

I also was given this advice somewhere.
But It is not clear to me what kind situations that I should choose one
over another.
I can't find yet a detail discussion about this. Let me make a wild guess.

I think most important things to consider are:

A1. The number of people connected to the server.
A2. How long the people will be connected to the server on average.
A3. How large the size of the data to cache. ( That is why you mentioned
about the size of description field )

If there are many people connect to the server and on average they stay long
then I should choose direct connection to the server because in this scenario
it will use much memory. But if few people connect to the server then I
should choose
caching. Can I say that?

-----

After doing some research and thought, actually the real problem is my
desktop mindset. I use this kind of technique on my desktop application.
Without too much consiration I apply this thing into our web project. I think
the approach should be listing all the data based on the user's selection and
user can choose and open a new form. The same technique applied by all the
search engine. I think I am going to use datagrid and paging for that
purpose.

I have been reading a book "Distributed Data Applications with ASP.NET". It
is an excellent book discussing about client scripting, business objects,
data tier and so on. With many examples, that book really helps me learning
ASP NET faster. Yes the idea to change the approach after reading that book.

--
Hermawih



"Steven Cheng[MSFT]" wrote:

Thanks for your followup Hermawih,

Based on your description, I think your current concern is that how to
improve the performance when a user select a certain data item in the
Listbox and need to display the description of this item, correct?

Currently, what you've tried is

** postback the page whenever a user select a item in listbox and query the
database and set the queried value to textbox

** still postback the page whenever a user select a certain item in
listbox, but instead of getting description by querying the backend
database, you read the cached DataSet(in server memory) for data,

I'm wondering how much is the size of each record's description? Is it
possible that we embed all the items(of the same country) in page's
response and make it hidden. and when a certain record is selected we use
client-side script to display it in textbox?

Also, for server-side caching, are you using the ASP.NET Cache storage? I
suggest you cache the datatable for records of each country (but set a
expire timeout). Thus, whenever your page postback to query descrption of a
record, you always try looking up the Cache(for the DataTable that mapped
to a certain country). if cache is empty, you query backedn db to fullfil
the cache. for such cache scenario, it will add memory presure of the
server machine, however, we have to make the choice whether we should
improve the response time or memory usage.

Please let me know your opinion or if you have any other questions.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Re: query parameters at the end of the JavaScript file
    ... information in the query is a version number. ... Browsers are not supposed to cache GET requests with queries AFAIK. ... Are you aware of any browser that doesn't cache a GET request? ... search engine on the web due to overload on the server of constantly giving the same search out. ...
    (comp.lang.javascript)
  • Re: Server Performance tuning - bei minimaler Hardware
    ... Oder hattest du den Server vor der ersten Messung länger laufen? ... Dieses mal nach ca. 30 Mins ohne Query Cache: ...
    (de.comp.datenbanken.mysql)
  • Re: Separating static and dynamic contents?
    ... server; no specific calls from the application are necessary. ... query is coming: As long as it's in the DB cache, ... be sent to the PHP process, ... The same query will just return data from cache. ...
    (comp.lang.php)
  • RE: lame server messages in named.log
    ... Nabin Limbu wrote: ... Alexey has already answered the lame server message in a previous post. ... Google turned up some interesting results for "query (cache) denied". ...
    (RedHat)
  • lame server messages in named.log
    ... Mar 30 05:42:30.526 security: info: client 202.52.250.176#1052: ... query (cache) denied ...
    (RedHat)