Announcement

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

    Help profiling SmartGWT

    Hi,

    We are using smartgwt 3.0 and we have an application that is suffering from some memory leaks.

    We are trying to figure out if it is our code that is causing these leaks. We are currently running JProfiler through hosted mode and we are getting a little confused.

    We were wondering if you could clear up what is happening here.

    We have a tab that has a TreeGrid on it. When we open the tab we can see that a Tree is created to populate our tree grid in JProfiler as expected. However, when we close the tab, the instance of the Tree never leaves JProfiler.

    Can anyone explain why this is??

    We suspect that it is something to do with how javascript objects are handled in hosted mode and JProfiler just wont work for javascript or UI objects. If you could confirm why this is happening that would be great as we are trying to figure out where Java profilers are useful in GWT and where they are not.

    Many thanks,
    John

    #2
    We haven't tried to use JProfiler with hosted mode but would generally expect bogus results from a pure Java tool that has not been specially adjusted for GWT.

    As far as TreeGrids and Trees, if you directly create a Tree you must destroy() it. If a Tree is automatically created for you by calling TreeGrid.fetchData(), it will be automatically destroyed when the TreeGrid is destroyed.

    Comment


      #3
      Thanks.

      So I assume if I manually create a Tree or a Datasource for a Grid and do not manually call destroy on the tree/datasource in onDestroy of the Grid, all the records hang around in memory even after the grid is gone??

      That could be the cause of our leak if that is the case!

      Comment


        #4
        It would be unusual to destroy() a DataSource and you wouldn't need to do this unless you are dynamically generating them every time you create a grid. A fixed set of DataSources is more typical, and in this case there's no need for destroy().

        What you might have meant is manually creating a ResultSet - like Tree, these objects do need to have destroy() called on them if you create them directly rather than with fetchData().

        Comment

        Working...
        X