Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15491] iOS7: ScrollableView Scroll very slow

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2013-10-23T22:46:39.000+0000
Affected Version/sRelease 3.1.3, Release 3.1.4
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam, triage
Reporternicolomonili
AssigneeIngo Muschenetz
Created2013-10-15T14:21:19.000+0000
Updated2017-03-20T22:12:19.000+0000

Description

The problem is the following: Scrollableview with 10 view, 150 objects(the problem occurs even with less loaded objects) for view, the loaded object is always the same and is a commonjs. The slowdown of the scroll will notice when you scroll, for example, from view 2 to 3, from 3 to 4 view, etc etc ... To see the problem just try to scroll slowly from one view to another, and as soon as you switch to another view you will notice the shot the problem comes with the following SDK titanium: 3.1.4.v20131008163742 3.1.3GA 3.1.2GA 3.1.1GA Code to be used for the test (and the attached video shows the problem): app.js
var w = Titanium.UI.createWindow({
    backgroundColor : 'black'
});

var scrollableViewAmbiente = Titanium.UI.createScrollableView({
    width : 1024,
    height : 648,
    top : 60,
    borderColor:'red',
    showPagingControl : true
});

var array_view = [];

var COMMON_JS = require('common_js');


for(var i = 0 ; i < 10 ; i++){
    
    
    
    var view = Ti.UI.createView({
        width : 1024,
        height : 648
    });
    
    
    var top = -30;
    var left = 30;
    
    for(var j = 0 ; j < 100 ; j ++){
        
        
        if(j%16 == 0){
            top += 60;
            left = 10;
        }
        
        var data_for_commonjs = {};
        data_for_commonjs.top = top;
        data_for_commonjs.left = left;
        
        var my_commonjs = new COMMON_JS(data_for_commonjs);
        
        view.add(my_commonjs);
        
        
        left +=60;

    }
    
    
    array_view[i] = view;
    
    
}


scrollableViewAmbiente.views = array_view;
scrollableViewAmbiente.cacheSize = array_view.length + 1;

w.add(scrollableViewAmbiente);

w.open();

common_js.js

function my_commonjs(data) {

    
    var view = Ti.UI.createView({
        width : 20,
        height : 20,
        top : data.top,
        left : data.left,
        backgroundColor : 'red',
        borderColor : 'green'
    });
    
    
    
    return view;

}

module.exports = my_commonjs;

Attachments

FileDateSize
slow scroll.mov2013-10-15T14:21:19.000+00004075272

Comments

  1. nicolomonili 2013-10-17

    I can not try the previous SDK (< 3.1.1GA) for addiction with node , but the problem was also present with the old SDK
  2. nicolomonili 2013-10-18

    anything?
  3. Ingo Muschenetz 2013-10-18

    Is this only present in iOS7, or was it also the same in iOS6?
  4. nicolomonili 2013-10-18

    This problem is present in iOS 6 and also in iOS 7
  5. Vishal Duggal 2013-10-23

    Duplicate of TIMOB-15095. Will be resolved as part of that
  6. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source