Realtime Messaging Memory Issue

Hi,

I am using SmartClient Power Edition v8.0 with Realtime Messaging module (release 1/5/2011) and IE 7 / Firefox v3.6.16 browser.

I have a listgrid that is updated every 10 seconds. The application is very interactive and is up all day. It works well except I notice in the windows task manager that the memory usage goes from 120MB to approximately 1200MB over time and keeps increasing and it gets to a point where I have to restart the browser. I tried lowering the connectionTTL from 120000ms to 60000ms and it helps i.e. browser releases memory. Wondering if you have any recommendations for the settings or other suggestions.

My server.properties file:

messaging.keepaliveInterval: 3000
messaging.keepaliveReestablishDelay: 1000
messaging.connectTimeout: 30000
#messaging.connectionTTL: 120000
messaging.connectionTTL: 60000
#messaging.flushBufferSize: 89056
messaging.flushBufferSize: 8096

messaging.dispatcherImplementer: com.isomorphic.messaging.LocalMessageDispatcher

Here is how I’m updating my listgrid:

function updateListgrid(someData)
{
    var records = MyListGrid.data;
    var n = records.getLength();     // approx 100-200 records
    for (var i = 0; i < n; i++)
    {
      var rec = records.get(i);
      rec.column1 = someData.column1;

      // ... update other columns in this row (~15 columns)

      MyListGrid.refreshRow(i);
    }

    MyListGrid.recalculateSummaries();
}

Thanks!

We have similar tests that don’t leak. There are a few ways to create false leaks:

  1. the application is running in GWT hosted mode

  2. Firebug or the IE Developer tools are open

  3. the SmartGWT Developer Console is open during the test

  4. the Developer Console is closed, but “Track RPCs” is set in the RPC tab

  5. the Developer Console is closed, but you’re doing something that’s causing warnings to be logged every refresh

  6. your application is logging something, either via SC.logWarn() or some other logging system

Check on these possibilities first - if it seems like you’ve got a legitimate leak, put together a test case showing the client-side code and the data you’re pushing through Messaging.