Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9220] Ti API: Analytics enabled by default causes performance issues

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-26T20:23:02.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 3.2.1, Release 3.3.0
ComponentsTiAPI
LabelsSupportTeam, core, module_analytics, qe-closed-3.2.3, qe-closed-3.3.0, qe-testadded
ReporterEduardo Gomez
AssigneeIngo Muschenetz
Created2012-05-24T06:45:54.000+0000
Updated2014-07-28T18:58:04.000+0000

Description

Issue

It looks like by very first time tiapp.xml enabled flag element (true) causes performance issues.

Tested on

iOS simulator iPod 5.1

Steps to reproduce

1. Create new project at Studio IDE 2. Goto tiapp.xml - true set automatically 3. Build & Run app 4. Press home button 5. Return to app - on resume a lag is potentially noticeable

Work around

Set flag manually as false when in development mode

Repro sequence

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

// create tab group
var tabGroup = Titanium.UI.createTabGroup();


//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 1',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

win1.add(label1);

//
// create controls tab and root window
//
var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});

var label2 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 2',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

win2.add(label2);



//
//  add tabs
//
tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  


// open tab group
tabGroup.open();

Comments

  1. Eduardo Gomez 2013-06-06

    Associated Q&A thread

    http://developer.appcelerator.com/question/135067/unable-to-disable-analytics-after-adding-any-module
  2. Ingo Muschenetz 2014-03-26

    Resolving as fixed. Needs confirmation by QE before closing.
  3. Deepti Pandey 2014-04-21

    Verified as FIXED using : OSX: 10.9.2 Xcode:5.1.1 acs@1.0.14 alloy@1.3.1 npm@1.3.2 titanium@3.2.3-beta2 titanium-code-processor@1.1.1-beta1 MobileSDK :3.2.3.v20140418101718 ,3.3.0.v20140418162516 Appcelerator Studio, build: 3.2.3.201404162038 Devices Used : iPhone 5s (7.1) ; iPod touch (7.1) No lag has been noticed when true is set in Tiapp.xml . Hence closing this ticket as FIXED.

JSON Source