memory usage of GridView

4 posts, 0 answers
  1. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 05 Sep 2011 Link to this post

    I would like some clarification on the point of memory usage. I would like to know if the memory usage of a grid like the one in 
    http://demos.telerik.com/silverlight/#GridView/DomainDataSource
    is considered normal.
    I've done some clicking and just noted the amount my Task-manager gave me.
    Action / Memory (Private working set)  / Working Set (memory)
    • Start the page / 94.276K / 142.236K
    • page 1->10 / 114.524K / 162.744K
    • page 10->1 / 115.552K / 163.808K
    • page 1->10 / 115.636K / 163.896K
    • page 10->1 / 111.104K / 159.408K 
    • page1->10->1 / 111.436K / 159.708K
    • refresh page / 102.136K / 173.572K
    • 1->10 / 117.016K / 188.496K
    • 10->1 / 119.696K / 191.144K
    • refresh / 105.564K  /  177.052K
    • 1->10 / 120.764K  / 192.252K
    • refresh / 108.332K / 179.762K
    • refresh / 104.404K / 175.916K
    • 1->10 / 119.472K / 190.984K

    now I'm not sure if I'm interpreting this right, but it takes +- 1,5MB  of Memory for each page that is being displayed using the pager.
    There isn't a lot of stuff going on, on these pages: it's showing 10 (string)columns and max 10 rows with an average of (let's say) 15 characters per cell = 10*10*15 bytes = 1500bytes of data = 1.4kB of data.
    Where does the rest of the memory come from????

    This is an issue for me since simple screens like this one consume quite a lot of memory and in our  LOB app, which is a MDI with a lot of screensthat  can be opened simultaneously, each window consumes quite a lot of memory. Even the simple ones where there is just a label, a textbox and a (simple) grid. With memory-usage increasing towards GB quantities at warp-speed, a lot of client-systems will run out of memory way too fast.  So I'm hoping our specs will not have to contain a requirement that at least 16GB of RAM is necessary to work properly :)

  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 07 Sep 2011 Link to this post

    Hello Sodi We,

    There was a memory leak with the older version of WCF RIA Services, but they fixed it with SP1.

    Anyway, we have our own control that is a direct replacement of the DomainDataSource. Here are its release notes:

    Due to the unplanned for increase in interest in development of Silverlight line of business applications, we are making our latest addition to our Silverlight suite available before our next major release so we can enable our clients to focus on delivering their great applications without worrying about any “plumbing”. Our new Domain Data Source components ensure seamless integration between Telerik data source controls and WCF RIA Services. Now all the powerful data-shaping features of Telerik RadControls can directly translate to your domain service – filtering and sorting operations, for example, are performed directly on the server with minimum development effort. Our Domain Data Services support includes both a component that you can embed in your Silverlight page and a CollectionView Implementation that you can use in your view models for a truly MVVM-enabled scenario. 
    To explore the new RadDomainDataSource control in greater depth, please check its online examples and take a look at the following blog posts:

    I have attached a sample project that uses our latest binaries. There is button that does garbage collect. I clicked on the pager many times, and sorted and filtered and so on, but after I click the garbage collection button the memory falls down. I inspected this sample project with WinDbg by doing this:

    !dumpheap -type Telerik -stat

    and after the garbage collect button is clicked, the Telerik objects seem to remain at a constant count, i.e. they do not keep on growing.

    Let us know if you manage to find a memory leak in this sample project. We will debug it immediately.

    Regards,
    Ross
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 08 Sep 2011 Link to this post

    thanks for the reply, but the issue I'm having does NOT concern memory leaks, it concerns memory usage.
    I just wanted to know if it is normal for a very very simple grid, with 10 rows and 10 columns, to use +-100MB of RAM
    (and peak at 120MB when all pages have been opened, I guess this difference is caused by the virtualization?)

    We have been building a LOB app for more than 2 years now, relying heavily on the telerik controls.
    But It seems that the app is using a massive amount of memory (which it releases, or should release after we fix the issues, so that's not the issue at the moment)

    We've build comparable apps, using winforms, wpf and asp.net, and memory usage of the app was never a big issue. But at the moment after a couple of minutes of using the app, the memory-usage shoots to 300MB and after 15 minutes it can shoot up to 1GB of RAM.
    Again this is not caused by a memory-leak, it's simply because the app is like an MDI and users can open different screens at the same time.

    I was just wondering if this is considered as normal and that's why I took a look at the demo of telerik, where I saw a similar memory usage. A very simple grid, with 10 rows and 10 colums that's consuming +- 100MB of RAM seems a lot to me

    the memory usage is not an issue on our development machines, which all have +4GB RAM on board, but user tests with more mainstream pc's have shown us that user experience degrades when memory usage peaks. So this is becoming an issue, because our customers will (most likely) haven't got a massive amount of memory on board
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 08 Sep 2011 Link to this post

    Hello Sodi We,

    We are constantly trying to reduce the memory footprint of our controls and we are doing the best that we can in this direction. But with every new feature that adds functionality to our controls, we have to make a certain trade-off. This is the hard decision everyone has to make in order to balance the three most important aspects of a software product -- namely speed, memory, and features.

    We cannot claim whether something is normal or not, since everyone has different perceptions about what is considered normal and what not. While it is true that there may exist a grid that does not take any memory at all, I doubt that it will have all the features that RadGridView does at the same time.

    Thank you for your understanding.

    Best wishes,
    Ross
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top