Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23618] Windows: Alloy.createController() takes much time to execute in windows environment.

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2019-11-12T14:54:21.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterJebun Naher
AssigneeUnknown
Created2016-07-11T09:03:42.000+0000
Updated2019-11-12T14:54:21.000+0000

Description

Alloy.createController() takes 200 ms to execute on windows and 11 ms on Android platform. Similarly the line "windows.open" takes 11ms on Android and 78ms on windows platform. This reduces the response time of the application on windows platform. We've used following code to measure the time taken by particular line to execute:
test.xml
<Alloy> 
<Window id="test"> 
<Label color="black" text="abc" /> 
<Label color="black" text="abc1" /> 
</Window> 
</Alloy>

test.js
function openWindow(){ 
$.test.open(); 
} 
exports.openWindow = openWindow;

index.js
function openView(){ 
Ti.API.info("Step 1 " +Date.now()); 
var controllerView = Alloy.createController('test'); 
Ti.API.info("Step 2 " + Date.now()); 
controllerView.openWindow(); 
Ti.API.info("Step 3 " + Date.now()); 
}
$.index.open();

index.xml
<Alloy> 
<Window id="index"> 
<Label color="black" text="Click" onClick="openView"/> 
</Window> 
</Alloy>
*Steps to test:* 1. Run the sample app in windows platform and observe the output of ti.API.info 2. Again run the app on android platform and compare both the output.

Comments

No comments

JSON Source