Some hints:
1. Since Dataset works with disconnected recordsets it is supposed to keep
the recorsets into memory. If you're working with it than do it smart. Make
it an Application level object and share it among all users as a in-memory
database. If you'll use the Dataset at Session level, or worst, at demand
(page level), all you'll obtain will be a lot of objects that have to be
garbage collected...
2. Remember, the garbage collector does not free objects in order to achieve
performance so all the objects will remain for a while in the pool. You
can't control the GC, you can only notify it that there are disposable
objects and have it run sometime with GC.Collect but that "give your
application some direct control over the garbage collector" as MSDN says.
Anyhow implementing "Dispose" can clean-up of objects before GC frees the
object; see:
ms-help://MS.NETFramework SDKv1.1/cpguidenf/html/cpconimplementi ngdisposemeth
od.htm in MSDN.
Frankly, GC is smarter than 90% of the programmers that are releasing the
resources; it was designed for that, maybe is not perfect but it does not
have bugs...
3. Another issue is, supposing you're not using the Dataset: does a "Select
* from hugeTable" to create an ASP page is a good approach? All the 10.000
records will be displayed? Does anyone need or can read a page that contains
10.000 records? Or, at page creation you'll select only 100 of them. Then
improve your SQL statements in order to return only the 100 records,
remember, you're not using ADO with "aduseserve r", you're using ADO.Net with
disconnected recordsets!
4. Anyhow the memory in use by a .Net application will be larger than the
one needed for a classic ASP application, and will try to use as much as
possible memory in order to improve the performance (to keep a pool of
unused objects ready to be delegated when a new instance of that type is
required). It's your call to find the balance.
--
Horatiu Ripa
"marcel" <No*****@nospam .com.au> wrote in message
news:OD******** ******@TK2MSFTN GP10.phx.gbl...
Recently we have been looking at converting our systems over to Dot net.
What has been of concern is the excessive amount of resources that a C#
SQL web page requires as apposed the ASP/SQL
We have recently moved an ASP page to C# this page that creates a sizable
report.
Under WK2000/IIS5 ASP SQL2000 the page requires about 250 meg of RAM
The same page as C# on WK2000/IIS5 and SQL2000 rockets over 500 meg!!
Is this normal does dot net require significantly more RAM to operate than
Classic ASP.
How much RAM does an WK2000 server running Dot Net require (don't say the
more the merrier). I ask this because some of the pages will not display
because the page required more than 60% of the RAM. I've never had this
problem with Classic ASP and I don't know if I can ever get the amount of
RAM into a server to satisfy C#.
Any Ideas, pointers would be of great help.
Marcel