Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Isomorphic
    replied
    You can use the Developer Console in a couple of ways to find leaks of components:

    1. a "Canvas count" is displayed in the Results tab - if this keeps going up, you are leaking components

    2. the "Watch Tab" shows all currently existing components. If new components keep appearing here as you repeat the cycle of your code, you are leaking components

    In addition, you can use isc.getKeys(window) to see all the global variables in your application - if on repeating runs you see the total number of variables rising here, take a look at the newly appearing entries.

    As far as your basic usage pattern - it's very strange to create a new DataSource each time you need to fetch data and you probably should not be doing that. However we attempted an internal test that behaves as you describe, and there was no leak.

    A couple of other basic items:

    1. you should update to the latest patched build

    2. you should test in any other browser and let us know whether you still see a leak

    3. you need to test in Firefox with Firebug disabled and see if you can create a leak. Firebug is known to leak memory when various tools are active.

    Leave a comment:


  • wing.t.lee
    replied
    SmartGWT version: SmartClient Version: v9.1p_2014-03-04/PowerEdition Deployment (built 2014-03-04)
    Browser: FireFox ESR 24.3.0, with FireBug installed

    I use about:memory in FireFox and check the memory usage under my URL (e.g. http://127.0.0.1:8080/app/)

    Application Logic
    1. click the result ListGrid, we will
    2. open a Tab in SmartGWT TabSet
    3. inside the Tab have a ValuesManager to contain several DynamicForms
    4. Create a DataSource and fetchData from server side to client
    5. set ValuesManager.editRecord in order to push the fetched record to the VLayout that contain ValuesManager
    6. when user click another record in the result list, we will invalidateCache for the DataSource in order to clean the client cache, and finally force destroy the DataSource, ValuesManager as well as VLayout and setPane again the existing Tab and load another record.

    Testing Steps:
    1. before start the click of result record, I click GC button in about:memory for several times until the memory for http://127.0.0.1:8080/app/ stable and unchange
    2. click several records one by one
    3. click GC button for several times again until memory stable and unchange. Check and find more memory used. (~ 10M of memory is used after each record
    4. I repeat step 2 - 3 again and again and find the memory keep going up even I click the GC button (as well as CC button...)

    So I want to ask
    1. is there any tools in SmartGWT that I can find, from Tab that any objects that is accumulated?
    2. Any methodology we can troubleshoot the memory leakage of SmartGWT client code? (especially we only use FireFox in our company...)
    3. From the Application Logic, any missing piece that would possibly cause memory leakage? Do we have some API in SmartGWT that can help to find or dump the leakage object...

    Best Regards

    Leave a comment:


  • Isomorphic
    replied
    Please let us know your exact SmartGWT and browser versions - we always need to know this.

    Note that a rising memory profile is not evidence of a memory leak - it might just mean that the system has plenty of free memory, and the actual problem where the app stops responding is something completely unrelated. To prove a memory leak, you need to starve the system of memory, to force the browser to reclaim unused memory. Alternatively, Firefox's about:memory screen has options to manually run GC, and to minimize memory usage - if you have used those options and the memory usage remains high, that would be a stronger indication that you have a real leak.

    Leave a comment:


  • I find Memory Leakage in client Firefox when use ValuesManager

    SmartGWT Power Edition version

    I have developed an application and use Firefox. And per checking vs about:memory and find the memory usage of that URL accumulate continues from 27M to over 200M until the application halt and no response after clicking several record and loaded data from server to client.

    I have already narrowed down the issue as following

    I have a search form that get the list grid, when double click the record on the search result listgrid, it will open/refocus a Tab.
    Inside the Tab, I use ValuesManager with add ~ 7-8 DynamicForms and ~ 100 fields, several ListGrid for child object. And when click the record in the result list grid, it will call editRecord and display the data onto the ValuesManager of the Tab.

    And When I click the first record in result list grid, the memory usage go from 27 to 40 and after some callback complete, it get back to 37,... and to continue click other, it continue to increase until it go to ~ 200M or 300M (in about:memory), the application become slow response and cannot proceed any more, we need to close the browser and start the Firefox again.
    We have tried closing the Tab but the memory not release in client side


    So I suspect that there is some memory leakage when I use ValuesManager as well as to call editRecord() for multiple records loading. So I want to check is there any possible,
    1. how can I check out the association that cannot detact after destroy?
    2. how to force clear up or destroy the ValuesManager so that I can release the objects... and free up the memory?
Working...
X