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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Memory consumption general

Thread ID:





6567 Aug 18,2003 12:08 PM UTC Aug 19,2003 03:44 AM UTC WinForms 3
Tags: GridControl
Jan Hornych
Asked On August 18, 2003 12:08 PM UTC

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 02:16 PM UTC

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 02:36 PM UTC

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 19, 2003 03:44 AM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon