[TIMOB-23618] Windows: Alloy.createController() takes much time to execute in windows environment.
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-11-12T14:54:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Jebun Naher |
Assignee | Unknown |
Created | 2016-07-11T09:03:42.000+0000 |
Updated | 2019-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.
No comments