How can I optimize the use of RAM when I need to show the user a large amount of data?

I have an application in which I use a DataGrid to display data to a user. I am using a DataTable to store data in memory. DataTable has about 70 columns.

I have a very large dataset. I want to display it in a DataGrid and use filters and other DataGrid data management functions (e.g. sorting). But I have a problem: when I load all my data into a DataSource object, it consumes more than 1 GB of RAM (MS Excel consumes only 60 MB). This allows the OS to use swap intensively and, of course, slows down the entire system.

My question is: is there a way to display data in a DataGrid and use all the advanced data management features without fully loading all of my data into a DataSource?

Thanks in advance.

+3
source share
2 answers

You need to use virtualization. Check out this blog post and this one.

Or this forum

+3
source

Since the user will never look at several screens at a time, you cannot explain to him the need for gigabytes of RAM to do this.

The database should be designed / indexed / optimized to provide partial data retrieval, at least for the “most common” cases.

, , "" 10 . 1000 1000 . , , ..

, Ajax, "" .

+2