[TIMOB-26700] Windows: Optimize UI rendering calls
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2019-03-11T14:54:38.000+0000 |
| Affected Version/s | Release 7.5.0 |
| Fix Version/s | Release 8.0.0 |
| Components | Windows |
| Labels | n/a |
| Reporter | Kota Iguchi |
| Assignee | Kota Iguchi |
| Created | 2019-01-08T01:09:47.000+0000 |
| Updated | 2019-03-11T14:54:38.000+0000 |
Description
Optimize UI rendering calls in our layout engine.
https://github.com/appcelerator/titanium_mobile_windows/pull/1345
Locally, I've got average 20% improvement when compared to 7.5.0.GA. I also saw that Jenkins runs unit tests faster than before by 4 mins (10 % faster) which is a good sign too.Ti.Analytics.optedOut = true; // Just to make sure networking won't affect the test var win = Ti.UI.createWindow({ backgroundColor: 'green' }); win.addEventListener('open', function () { var start = +new Date(); for (var i = 0; i < 200; i++) { win.add(Ti.UI.createLabel({ width: 200, height: 50, left: i * 10, top: i * 10, backgroundColor: '#0000FF', text: 'Hello, World' })); } // setTimeout() effectively push tasks on UI thread. // This can be useful when you need to see actual UI response time. setTimeout(function () { alert((+new Date() - start) + ' m seconds elapsed'); }, 0) }); win.open();master: https://github.com/appcelerator/titanium_mobile_windows/pull/1345 8_0_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1364
Note that this will introduce major breaking change on binary compatibility on module interfaces which requires major version bump-up on module
apiversion. _All modules needs to be recompiled based on new sdk._ TIMOB-26886 is taking care ofapiversionin the sdk.So far I can see good results on most practical app from customer (aka PerformanceTestApp). I can see up to 37% less application startup time and 45% less UI rendering time.
For additional note, I would strongly recommend consider disabling
transpileflag intiapp.xmlwhen you concern runtime performance. We observed that enabling transpile slows down the app because it tend to add lots of files and operations in order to support ES6+.Merged.
*Verified as Fixed* The fix is present in SDK {noformat} 8.0.0.v20190308114556 {noformat} *ENV* {noformat} Noka lumia 550 (Win 10) Ws-emulator Windows 10 Pro: 1803 Appc NPM: 4.2.13 Appc CLI: 7.0.10-master.17 Ti CLI Ver: 5.1.1 Node Ver: 8.9.1 NPM Ver: 6.4.1 {noformat} *Closing ticket*