We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Memory consumption general

Thread ID:

Created:

Updated:

Platform:

Replies:

6567 Aug 18,2003 08:08 AM Aug 18,2003 11:44 PM Windows Forms 3
loading
Tags: GridControl
Jan Hornych
Asked On August 18, 2003 08:08 AM

When I add an empty GridControl to my form, memory usage of my application increases by about 9MB compared to the same form without grid. What is causing it ? Is there a way to switch off usage of some internal data container in the grid ? I provide data to the grid only dynamically by events, I would expect some memory savings at the GridControl itself. Thanks, Jan

Administrator [Syncfusion]
Replied On August 18, 2003 10:16 AM

The first time a grid is loaded, the Grid and Shared assemblies are loaded as well. But this normally is about .5Meg, not 9Meg. The attached sample illustrates this. Are you explicilty setting grid.RowCount = some value? If so, then this potentially allocates storage. In a 'perfect' virtual grid, you would not do this, but instead dynamically provide the row and column counts through QueryColCount and QueryRowCount events. Can you explain a little more about what you are doing, or see the problem in the sample?

Sean Greer
Replied On August 18, 2003 10:36 AM

If you're looking at the "Mem Usage" column in the Task Manager's Processes tab, the value that you're seeing is the working set size of the application. This represents the reserved memory, not the committed. Essentially when the grid is loaded a number of DLLs are loaded and the OS reserves enough memory for the code and data pages of the DLLs. If you minimize the application and then restore it, you'll see that the working set is reduced. This is because the OS trims the working set of the process to reduce the amount of reserved memory. You can do this as well by P/Invoke'ing SetProcessWorkingSetSize. To get a better idea of the actual memory your application is using you might want to take a look at the Memory:Private Bytes performance counter.

Jan Hornych
Replied On August 18, 2003 11:44 PM

Clay, your example is behaving exactly as mine, about 10MB increase when opening the grid. ... and the memory values follow Sean's description. This explanation is good enough for me, thanks for clearing it up. Jan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;