{ "id": "172048", "key": "TIMOB-26292", "fields": { "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2018-08-13T00:59:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "20183", "description": "", "name": "Release 7.4.0", "archived": false, "released": true, "releaseDate": "2018-09-17" } ], "issuelinks": [ { "id": "57091", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172826", "key": "TIMOB-26699", "fields": { "summary": "Windows: Runtime Performance Improvement", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } }, { "id": "56897", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172363", "key": "TIMOB-26416", "fields": { "summary": "Fix UI rendering performance issue that was causing the UI to freeze", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "56730", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171983", "key": "TIMOB-26247", "fields": { "summary": "Windows: Loading new views is talking lot of time", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-08T01:03:12.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "Peformance has been the issue on Windows for a long time. From what I observed, some basic JavaScript operations (like calling constructor, accessing properties and functions) against Titanium proxy objects are simply slow. For instance, creating 200 proxy objects on Windows (Titanium 7.4.0.GA) takes about 2 seconds on Windows locally for me.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'green' });\r\n\r\nwin.addEventListener('open', function() {\r\n var start = +new Date();\r\n for (var i = 0; i < 200; i++) {\r\n win.add(Ti.UI.createView({\r\n width: 50, height: 50, left: i * 10, top: i * 10\r\n }));\r\n }\r\n // setTimeout() effectively push tasks on UI thread.\r\n // This can be useful when you need to see actual UI response time.\r\n setTimeout(function() {\r\n alert((+new Date() - start) + ' seconds elapsed');\r\n }, 0)\r\n});\r\nwin.open(); \r\n{code}\r\n\r\nWe have been improving performance overall and have archived huge improvements like TIMOB-23637 but yet we can't keep up with other platforms regarding performance now, I am guessing that huge difference between other platforms (especially between iOS) is that the unavailability of JIT (Just In Time) compiler on our JavaScript engine. On Windows, JIT is not enabled because it is not available yet. It is huge disadvantage regarding performance. \r\n\r\nSo this is quite fundamental issue. In order to improve performance, we might want to consider developing JavaScriptCore JIT for Windows, or try switching to Chakra, a JavaScript engine which Microsoft developed, which should have JIT enabled and should provide much better performance unlike our custom JavaScriptCore port. Again this requires big-and-fundamental changes regarding our Titanium (AKA {{TitaniumKit}} and {{HAL}}) framework overall technically, and I don't think we can archive huge peformance improvements without this.", "attachment": [], "flagged": false, "summary": "Windows: Switching to JsRT (Chakra) for better performance", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 }, { "id": 1093, "state": "closed", "name": "2018 Sprint 23", "startDate": "2018-11-04T23:35:52.006Z", "endDate": "2018-11-18T23:35:00.000Z", "completeDate": "2018-11-19T05:30:34.338Z", "originBoardId": 114 }, { "id": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 }, { "id": 1084, "state": "closed", "name": "2018 Sprint 21", "startDate": "2018-10-07T23:32:40.560Z", "endDate": "2018-10-21T23:32:00.000Z", "completeDate": "2018-10-21T23:19:05.460Z", "originBoardId": 114 }, { "id": 1070, "state": "closed", "name": "2018 Sprint 18 SDK", "startDate": "2018-08-26T16:14:35.297Z", "endDate": "2018-09-09T16:14:00.000Z", "completeDate": "2018-09-11T20:59:21.495Z", "originBoardId": 114 }, { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "440716", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "According to ChakraCore [JavaScript Runtime (JSRT) reference|https://github.com/Microsoft/ChakraCore/wiki/JavaScript-Runtime-%28JSRT%29-Reference], it is highly likely feasible to implement part of HAL APIs such as JSValue because ChakraCore has similar APIs like JSValueRef. ChakraCore also provides a way to define native callback functions by using [JsNativeFunction|https://github.com/Microsoft/ChakraCore/wiki/JsNativeFunction] that gives us a way to simulate {{HAL::JSExport}} API. One thing I noticed that's missing is the ability to define property callbacks. This is critical because HAL API needs it. So we might want to consider fundamental changes in HAL if we use ChakraCore, like generating getter/setter for Titanium properties by using {{Object.defineProperties}} at startup. Luckily ChakraCore provides a way to serialize scripts using [JsSerializeScript|https://github.com/Microsoft/ChakraCore/wiki/JavaScript-Runtime-%28JSRT%29-Overview#script-serialization-with-lazy-source-loading], that may be very useful to pre-parse and lazy-load Titanium classes at runtime. The other downside is that ChakraCore doesn't support iOS and Android. It may be critical because originally HAL and TitaniumKit was aiming to be cross-platform.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-08-14T01:41:09.000+0000", "updated": "2018-08-14T02:10:19.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }