Template Columns consuming memory
Have any of you came across memory/resource problems when using an ASP.NET
DataGrid that is bound to a DataTable with a large resultset (9,000 rows or
more)? Typically, you would invoke DataGrid paging for something like this,
but "they" are not doing this. Besides, follow me through on this case:
(Using Windows XP Pro w/ SP2 and Microsoft .Net Framework v1.1 SP1) on a
machine with 1GB RAM and in-process Session State.
The DataGrid is being used in two different ways. 1 version collects
information and displays it with paging enabled. The whole resultset
contains 10,000 records and is cached/stored. The ASP.Net worker process is
sitting at 54MB of RAM at this point. Mind you that there are about 8
columns, with which 3 of them are template columns, containing a TextBox,
but combines 4 other fields to make the cell.
Now, if show the same grid, without paging, the ASP.NET Worker Process just
grinds away, eating up memory. It peaks at 270MB of RAM while it is
Binding, and after the bind is complete, memory sustains at 224MB RAM. This
memory never seems to be GC'd, and so if you run this process a few more
times, then ASP.NET resets itself, as it used up all the memory. YIKES!
Note, that even with ViewState off, not much difference is made here.
Of course this problem seems to go away if I take out the template columns.
Anyone ever experience this problem? Of course, the quick answer might be
to not use the DataGrid, and use other means, which renders a straight HTML
table with my output, but that DataGrid is such a sweet tool at times. Yes,
no one in their right mind would want to show thousands of results in a darn
table, but the issue really si about memory leaks, as if you ran my scenario
with resultsets of 250 many times, you will recreate the issue. I suspect
it's something to do with Templatre Collumns. Anyone?
|All times are GMT. The time now is 08:29 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.