Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26292

Windows: Switching to JsRT (Chakra) for better performance

    Details

    • Type: Epic
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: Release 7.4.0
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
      None
    • Epic Name:
      Windows Moving to Chakra
    • Story Points:
      23
    • Sprint:
      2016 Sprint 17 SDK, 2018 Sprint 18 SDK, 2018 Sprint 19 SDK, 2018 Sprint 20 SDK, 2018 Sprint 21, 2018 Sprint 22, 2018 Sprint 23

      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.

      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.createView({
                  width: 50, height: 50, left: i * 10, top: i * 10
              }));
          }
          // 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) + ' seconds elapsed');
          }, 0)
      });
      win.open(); 
      

      We 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.

      So 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi (Inactive)
                Reporter:
                kiguchi Kota Iguchi (Inactive)
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-6519
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration