[CLOSED] Question about memory consumption

  1. #1

    [CLOSED] Question about memory consumption

    hi,

    i made several tests in order to compare performance of our old application with an ext.net based prototype.

    our old application is a basic asp.net application with standard htm rendering.

    i compared the memory consumption of the browser using the two applications.

    the result is that the Ext.Net application consums very more memory than the standard asp.net application.

    12MBytes increases for the asp.net application and 32MBytes for the ext.net application ( test made on IE8)

    MVC.Ext.net Test
    I decided to make the same test on the mvc.ext.net application in order to see if it is due to my own application or not.

    I made the following test using a new instance of my IE8.

    access to login page, login, customer details, customer list, order list.

    At the end of the test the memory attached to the IE8 process is 96 MBytes

    When i close each tab, there are no memory free, i return to a page with a single tab (home) and the memory is still 96 MBytes.

    Questions
    Our application is for public end users with different kind of browsers. Our application usually display reports of 50 lines max.

    1- Is there a minimum configuration required for end user workstation ?

    2- memory issues of browsers are know problems but is there a way to free memory attached to a tab ? i think it should be possible.

    3- Accessing to the default login page required up to 25 Mo, is there a way to decrease this amount of memory ? reducing js packages for example ? mvc.ext.net (31 MBytes for first page)

    4- end users workstation can run with 256-512 MBytes. When making several searches or displaying/closing tabs, memory is not correctly free, this can be a problem while html based applications need less memory.

    thanks for your help
    Last edited by geoffrey.mcgill; Jan 10, 2011 at 4:39 PM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by ddslogistics View Post

    2- memory issues of browsers are know problems but is there a way to free memory attached to a tab ? i think it should be possible.

    4- end users workstation can run with 256-512 MBytes. When making several searches or displaying/closing tabs, memory is not correctly free, this can be a problem while html based applications need less memory.
    Hi,

    I guess you use <Content> of tabs like the following:

    Example
    <ext:TabPanel runat="server">
        <Items>
            <ext:Panel runat="server" Title="Tab1">
                <Content>
                
                </Content>            
            </ext:Panel>
            ...
        </Items>
    </ext:TabPanel>
    Is it right?

    If so, please use <Items> instead of <Content> if possible. Widgets from <Items> of tab must be destroyed automatically when this tab is closed.
  3. #3
    Hi,

    Ext.Net is based on ExtJS toolkit on the client side. It is quite big toolkit and can use much resources. I recommend to make a search on ExtJS forum with "memory consumption" keywords
    http://www.sencha.com/forum/

    Here is few quotes from ExtJS forum

    http://www.sencha.com/forum/showthre...053#post438053
    If you look at the "memory consumption" of an app from the outside, e.g. with Task Manager, you only see part of the picture. JavaScript has a "lazy" storage manager that takes deallocated objects and holds onto them, itself, for recycling. (It's trying to avoid "giving the storage back to the OS, just to have to request it again a few milliseconds later," because anything involving the OS memory-manager is more expensive. It also wants to avoid "touching" memory areas unnecessarily, which might trigger a page-fault.)

    The OS is "lazy" too. It won't sweep through storage if it's not "short on storage," because there is no material advantage in taking the time to do so. It won't even take the pages out of working-sets... which means that storage consumption is now over-stated (i.e. "but who cares?"). Saves fuel for the garbage-trucks, you know...

    Only when a moderate "squeeze" is placed on the storage subsystem will you start seeing these various mechanisms kick in. On a (typically big and copious) developer's machine, you usually have to induce storage-stress to get an accurate picture... and there are, of course, tools that will do just that.

    And then you need to judge for yourself how realistic that scenario is, or isn't. One of the first things to go is recently-used programs and libraries, which can make the system feel much more sluggish in actual practice and might not at all be something your software would actually encounter "in the field." You really need to know, if you can know, just how big "a typical user's" machine is: how much physical RAM, how fast etc.) Lots of machines these days are actually very big, because hey, "chips are cheap." Take advantage of that.
    http://www.sencha.com/forum/showthre...576#post418576
    If FF is accumulating that much memory, vs. what it occupies when your application is first loaded, then you probably have a "memory leak." In systems like JavaScript, such "leaks" are not actually caused by "the memory allocator has broken down," but rather by the accumulation of still-referenced objects that should have been garbage collected but, because their reference-counts did not return to zero, were not.

    To elaborate: if you use an assignment statement such as "a.x = b.y;" what often happens is that the "x" element of "a" acquires a reference to the "y" element of "b." (Or more properly, a reference to whatever bit of data "b.y" currently also refers-to at this moment in time.) The reference count of that "whatever bit of data" is now incremented, so that the "bit of data" will not be disposed-of until all of the references to it cease to exist. But... what if those references never "cease to exist?" What if that conglomerated data structure refers to itself? (A so-called "circular reference chain.") The garbage collector will never find that those "bits of data" can be safely disposed-of.

    "You can't get rid of Amy because she is Brenda's friend. And, you can't get rid of Brenda because she is Amy's friend." (So you are stuck with both of the little rug-rats ...)

    It is reasonable to assume that the base ExtJS class-library does not contain reference-errors itself, but it is entirely possible that your application code could produce such a scenario. Problems can be caused in very subtle ways, such as a misunderstanding of the JavaScript mechanism of "closures." A good place to start will be to carefully observe what causes the memory-consumption to bump up. Is it, for example, each time a particular data-block is received?

    Finally, remember that an operating system is designed to be "lazy." It won't do anything if it is not forced to do it. So, the memory allocation of an application (as seen by an operating system) will grow on its own until paging starts (in earnest), simply because there is no motivation to do otherwise. The OS does not know what JavaScript considers to be "in-use" vs. "free," and JavaScript will not go out of its way to return chunks of memory to the OS because those calls are expensive. You need to put the system into a state of controlled memory-stress to flush out what is normal vs. abnormal behavior.
  4. #4
    Hi,

    Thanks for your feedback.

    Can you post the source for your test projects? It would be helpful for us to run the projects locally and performs some tests. You could email to support@object.net if you cannot post publicly in the forums.

    That said, comparing a straight ASP.NET (Webform or MVC) project to an Ext.NET project is just not a fair comparison. The two projects will not share the same features and functionality. Might be better to run your tests against a high level control framework such as Telerik vs. Ext.NET vs. ASP.NET.
    Geoffrey McGill
    Founder
  5. #5
    Quote Originally Posted by Daniil View Post
    Hi,

    I guess you use <Content> of tabs like the following:

    Example
    <ext:TabPanel runat="server">
        <Items>
            <ext:Panel runat="server" Title="Tab1">
                <Content>
                
                </Content>            
            </ext:Panel>
            ...
        </Items>
    </ext:TabPanel>
    Is it right?

    If so, please use <Items> instead of <Content> if possible. Widgets from <Items> of tab must be destroyed automatically when this tab is closed.
    Hi,

    In my own prototype project i don't use tabs, i use basic pages with redirect. And i noticed a very higher memory consumption compared to my previous version based on asp.net framework.

    My remarks about tabs were on the mvc.ext.net provides on https://examples1.ext.net.

    We plan to migrate our asp.net application on ext.net framework and to use tabbed pages.

    mvc.ext.net is a good example of what could be our future application.

    That's why i made tests on the mvc.ext.net.

    The memory consumption on IE8 is very high regarding the amount of data displayed at screen.

    Our application is a web front office used all the day by our end users.

    I just want to ensure that there will not be memory issues on end user workstation after several hours of use.

    Julien
  6. #6
    Quote Originally Posted by geoffrey.mcgill View Post
    Hi,

    Thanks for your feedback.

    Can you post the source for your test projects? It would be helpful for us to run the projects locally and performs some tests. You could email to support@object.net if you cannot post publicly in the forums.

    That said, comparing a straight ASP.NET (Webform or MVC) project to an Ext.NET project is just not a fair comparison. The two projects will not share the same features and functionality. Might be better to run your tests against a high level control framework such as Telerik vs. Ext.NET vs. ASP.NET.
    Hi,

    i agree with you it's not fair.

    but a end user using an application running well for years cannot appreciate the new features if the new version run slower on his computer or lead to memory issues.

    im not saying it will, it just want to anticipate the problem before starting heavy dev or produce prerequesites for my application.

    i would resume it as follow.

    if i use an application like mvc.ext.net during a day, clicking every 5 minutes on a new screen, does this lead to a memory issue, browser freeze or out of memory problems on a computer with 256-512 MBytes of memory ?

    Thx for your help

    Julien
  7. #7
    We sell a SAAS application that our users are in all day long like a desktop application and have not had any complaints about memory. Our app uses a lot of ext.net controls on various pages. What works best for us is using panels in iframe mode and loading different pages into the frames. We have around 2000+ users a day, about 300-400 active at any one given time. You have to have the servers to push this kind of stuff but we have been very happy with the results ext.net has allowed us to achieve.

Similar Threads

  1. [CLOSED] Memory leak
    By bbo1971 in forum 2.x Legacy Premium Help
    Replies: 35
    Last Post: Feb 08, 2013, 3:54 PM
  2. [CLOSED] [1.2] Memory
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 15, 2012, 6:31 PM
  3. Out of memory
    By theblackcat_2902 in forum 1.x Help
    Replies: 1
    Last Post: May 08, 2011, 1:09 AM
  4. [CLOSED] memory leaks
    By acrossdev in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 22, 2011, 11:10 AM
  5. Memory Leak in I.E.
    By crazypsdev in forum 1.x Help
    Replies: 6
    Last Post: Nov 09, 2009, 9:55 AM

Posting Permissions