PDA

View Full Version : GridView memory problem



niccotnt
14 Mar 2011, 11:18 AM
I'm experiencing a memory problem with GridView.

Here is the problem in steps:

1. Build a store and a grid with a rowclick listener
1. Get a record reference rec = store.getById(num)
2. Change some values of the record with rec.set
3. Commit changes

The point (2) increases the memory, and sometimes point (3) too.
The memory always increases, and if we have a script that automatically updates the store, the system consumes about 250MB in a day.

Here are my columns:



columns: [
{id:'icon', header: 'Field 1', width: 40, sortable: true, renderer: iconRenderer},
{id:'priority', header:'Field 2', width: 40, sortable: true, dataIndex: 'Priority'},
{id:'site', header: 'Field 3', width: 100, sortable: true, dataIndex: 'SiteName'},
{id:'alrmid', header: 'Field 4', width: 100, sortable: true, dataIndex: 'Id'},
{id:'alrm-desc', header: 'Field 5', width: 250, sortable: true, dataIndex: 'Description'},
{id:'ack_state', header: 'Field 6', width: 40, sortable: true, renderer: ackIconRenderer},
{id:'alrm_count', header: 'Field 7', width: 60, sortable: true, dataIndex: 'Count'},
{id:'ts', header: 'Timestamp', width: 120, sortable: true, renderer: Ext.util.Format.dateRenderer('d/m/Y H:i:s'), dataIndex: 'Updated'}
],
As you can see I have 2 callbacks (renderers) attached to the columns, and as I said, an event handler on rowclick events.

Can you reproduce this behavior, or it's just my code?
Thanks