Results 1 to 3 of 3

Thread: Memory crash in ExtJS V4.1.1, but not in ExtJS V4.0.7 Chrome 18

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    8
    Vote Rating
    0
      0  

    Default Memory crash in ExtJS V4.1.1, but not in ExtJS V4.0.7 Chrome 18

    REQUIRED INFORMATION


    Ext version tested:
    • ExtJS V4.1.1
    • ExtJS V4.0.7


    Browser versions tested against:
    • IE9
    • Chrome 18


    Description:
    • In ExtJS V4.1.1, Drawing a line of dynamic changes, the update time is set to 10 ms. When running about 10 minutes, the memory grew nearly 400M. Here is my data caption in Windows Task Manager.

      Code:
      147M(17:43:26) -> 232M(17:48:11)
      But In ExtJS V4.0.7, Chrome 18: The page run with no problem. Here is my data:

      Code:
      64M(16:46:45) -> 100M[15M](17:14:54) -> 90M[10M](18:03:41) -> 90M[10M](18:58:22) -> 95M[10M](19:47:32)
      In ExtJS V4.0.7, IE 9 still have the memory grow problem.


    Steps to reproduce the problem:
    • call the doStart() function to start test


    The result that was expected:
    • Memory should be stable


    The result that occurs instead:
    • The memory been in growth


    Test Case:

    Code:
    var timerUpdate = null;
    var store = null;
    var curIndex = 0;
    
    var count = 10;
    var yValue = 0;
    var chart = null;
    
    var gData = [];
    
    Ext.Loader.setConfig({  
        disableCaching : false
    }); 
    
    
    Ext.require('Ext.chart.Chart');
    
    Ext.define('coord',{
        extend: 'Ext.data.Model',
        fields: ['x', 'y']
    });
    
    Ext.onReady(function () {
        createChart();
    });
    
    function createChart() {
    
        if (store == null) {
            store = Ext.create('Ext.data.Store',{
                model: 'coord',
                data:[
                    {x: 2, y:2}
                ]
            });
        }
    
        if (chart == null) {
            chart = Ext.create('Ext.chart.Chart', {
                renderTo: 'chart',
                width: 300,
                height: 300,
                store: store,
                theme: 'Base',
                axes: [{
                    title: 'y',
                    type: 'Numeric',
                    position: 'left',
                    fields: ['y'],
                    minimum: 0,
                    maximum: count
                },{
                    title: 'x',
                    type: 'Numeric',
                    position: 'top',
                    fields: ['x'],
                    minimum: 0,
                    maximum: count
                }],
                series: [
                    {
                        type: 'line',
                        xField: 'x',
                        yField: 'y'
                    }
                ]
            });
        }
    }
    
    function destroyChart() {
        if (chart) {
            Ext.destroy(chart);
            chart = null;
        }
        curIndex = 0;
    }
    
    function getData() {
    
        if (store == null) {
            return ;
        }
    
        yValue++;
        if (yValue >= count) {
            yValue = 0;
        }
    
    
        var data = [{x:curIndex, y:yValue}];
    
        if ( curIndex <= 0 ) {
            store.removeAll(true);        
    
            gData = [];
            gData.push({x:curIndex, y:yValue});
    
        } else if ( curIndex > count){
    
    
            var i = 0;
            var storeCount = gData.length;
            for (i = 0; i < storeCount - 1; i++) {
                gData[i].y = gData[i+1].y;
            }
            gData[i].y = data[0].y;
    
            curIndex--;
    
        } else {
    
            gData.push({x:curIndex, y:yValue});
    
        }
    
        store.loadData(                
            gData
        );
    
        curIndex++;
    
        // console.log(store.getCount()+"point");
    }
    
    function doStart() {
        
        if (timerUpdate) {
            clearInterval(timerUpdate);
            timerUpdate = null;
        }
    
        timerUpdate = setInterval("getData()", 10);
    
    }
    
    function doStop() {
    
        if (timerUpdate) {
            clearInterval(timerUpdate);
            timerUpdate = null;
        }
    
        destroyChart();
    }


    HELPFUL INFORMATION

    Operating System:
    • Windows XP SP3

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    8
    Vote Rating
    0
      0  

    Default

    Any news?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •