[TIMOB-4457] Eliminate performance bottlenecks in creating views with properties
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-06-28T09:52:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-25, Release 1.7.2 |
Components | iOS |
Labels | performance |
Reporter | Reggie Seagraves |
Assignee | Reggie Seagraves |
Created | 2011-06-20T08:55:00.000+0000 |
Updated | 2017-03-08T23:41:15.000+0000 |
Description
We have some evidence that creating views with properties are inordinately slow.
For better testing, included is a minimal test harness:
Test was done with 1000 iterations on an iPod 3, iOS 4.0.2. There was 5 tests each to get a peek at the std deviation. Each test was a separate launch of the application to remove memory issues as being a factor. * var temp=Ti.UI.createView(); ** 745, 714, 718, 715, 715 ** Mean: 721.4 SD: 13.2778 * var temp=Ti.UI.createView({left:10,top:50}); ** 1169, 1184, 1186, 1200, 1178 ** Mean: 1183.4 SD: 11.39298 * var temp=Ti.UI.createView({}); ** 912, 926, 923, 917, 909 ** Mean: 917.4, SD: 7.1624 * var temp=Ti.UI.createView(); var other = {left:10,top:50}; ** 709, 732, 730, 715, 717 ** Mean: 720.6 SD: 9.96494 * var other = {left:10,top:50}; ** 1 //Less than the margin of error; ignoring. * var temp = funct(); //With funct defined as Ti.UI.createView, to remove the lookup cost ** 557, 556, 562, 556, 562 ** Mean: 558.6 SD: 3.1305 * var temp = funct({left:10,top:50}); ** 1020, 1009, 1033, 1022, 1016 ** Mean: 1020 SD: 8.80341 * var temp = funct({}); ** 763, 760, 758, 761, 759 ** Mean: 760.2 SD: 1.92354 * var temp=Ti.UI.createView(); //funct was defined, but Ti.UI.createView was tested to determine if caching was significant. ** 719 //Deemed insignificant.
Assisted QE with validation. Merged pull request.
Required to merge to 1.7.2.
Merged to 1.7.x
Closing ticket as fixed.