Wrox Home  
Search P2P Archive for: Go

  Return to Index  

ado_dotnet thread: efficiency


Message #1 by renevazquez@c... on Mon, 23 Sep 2002 12:32:20 -0500
     
     HI all!. I want to be advised in some design choice that I have made. 
     I load informacion from 2 related tables into a dataset. I want that 
     the users could filter and sort the two tables and also could move 
     form page to page of data in these filtered or sorted views. 
     
     The solution that I give, (wich I'm afraid is not very efficient) is 
     to load the entire dataset in a session variable and then work with 
     the data that each of the users have in their sessions. In these way 
     the user filter the data, he can continue sorting or paginating 
     through this personal view of the databse. If someone could give me a 
     n approach tgo this situation the help would be extremely appreciated.
     
     thanks to all in advance.

Message #2 by "Brian Smith" <bsmith@l...> on Mon, 23 Sep 2002 17:54:46 +0100
The best solution will depend very much on the volume of data, and the
number of concurrent sessions you have to typically maintain. It might
well be the case that re-querying the database on each request is the
most efficient solution. Other alternatives depend on how prescriptive
you want to be on the client. If a .net client can be prescribed, then
downloading the dataset and a wrapper component to the client would be
the most efficient solution. For non .net clients, you could use an xml
data island, and some local DHTML code. 

The choice is yours.. :-)

brian

-----Original Message-----
From: renevazquez@c... [mailto:renevazquez@c...] 
Sent: Mon, 23 Sep 2002 18:32
To: ADO.NET
Subject: [ado_dotnet] efficiency


     
     HI all!. I want to be advised in some design choice that I have
made. 
     I load informacion from 2 related tables into a dataset. I want
that 
     the users could filter and sort the two tables and also could move 
     form page to page of data in these filtered or sorted views. 
     
     The solution that I give, (wich I'm afraid is not very efficient)
is 
     to load the entire dataset in a session variable and then work with

     the data that each of the users have in their sessions. In these
way 
     the user filter the data, he can continue sorting or paginating 
     through this personal view of the databse. If someone could give me
a 
     n approach tgo this situation the help would be extremely
appreciated.
     
     thanks to all in advance.


---
ASP.NET Distributed Data Applications
This book will inspire you with a range of ideas on how data 
can be used to drive Web applications, and how that data can 
be most effectively utilized at each level of the design. 
Inefficient data use leads to the sort of slow, unresponsive 
Web applications that nobody enjoys using. By making good use 
of both server and client-side code, we can solve these 
problems. This book will arm you with the techniques you need 
to build Web applications that fly.
http://www.wrox.com/ACON11.asp?ISBN=1861004923

Message #3 by "Alfred de Weerd" <adeweerd@h...> on Tue, 24 Sep 2002 09:25:42
>  There's also memory-efficiency to consider. If you put the dataset in 
the application object, you would have to store the dataset only once in 
memory. User specific info, like filters, you keep in their respective 
sessions.

Alfred



    
     HI all!. I want to be advised in some design choice that I have made. 
     I load informacion from 2 related tables into a dataset. I want that 
     the users could filter and sort the two tables and also could move 
     form page to page of data in these filtered or sorted views. 
     
     The solution that I give, (wich I'm afraid is not very efficient) is 
     to load the entire dataset in a session variable and then work with 
     the data that each of the users have in their sessions. In these way 
     the user filter the data, he can continue sorting or paginating 
     through this personal view of the databse. If someone could give me a 
     n approach tgo this situation the help would be extremely appreciated.
     
     thanks to all in advance.

Message #4 by "Ludington, Kruse" <kruse.ludington@c...> on Tue, 24 Sep 2002 12:00:34 +0100
In return for my suggestions below, can you answer two questions:

1. Where can I find a .net combobox that supports display of multiple columns in the dropdownlist ?

2. Also, this should not be too difficult (easier than my suggestions below), can anyone find an example of how to display the
supplied system font dialog in a specified position (I have dual monitors, it shows up half on one and half on the other [it tries
to center itself, incorrectly])...

Here are my suggestions:

Put UI into a separate thread

Write a process that acts like a datareader (msft datareader is too slow)

Create 'bridge' objects for communication between the threads

Datagrid is too slow, create a usercontrol inherited from a listview control. Give it an ibindinglist interface (also look up
ODcacheHint in msdn help). This is the fastest grid you will ever see. If there is almost no code to process, then any processing is
extremely fast !

Datatable is pretty fast, however for the fastest implementation you could create a self describing datacache containing definitions
for implicit translation between all datatypes (and this must live on the thread separate from the ui).

Messages you pass from the thread holding the cache to the ui should only contain the rows the user sees on the grid, never more.

Due to a bug in GDI+, you will find your win32-listview-based grid only supports non-translated fonts (native). You will find the
supplied system font dialog can be launched with a parameter allowing only those selections.

If you must have widgets like comboboXes, etc in your grid cells, however, and don't want to pay for any third party tools, you
would have to use the .net datagrid. Even so, they only supply you with gridcolumnstyles of text and bool, however, you can create
your own gridcolumstyles that contain whatever you like, (It's easiest to derive those classes from textboxcolumnstyle so you don't
have to reinvent the wheel each time).

Hope this helps...

- Kruse

This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information.
No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately
delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or
indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE
GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE
FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are
those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views
of any such entity.
Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not
constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as 
preliminary only and subject to our formal written confirmation.



  Return to Index