Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-24413

[Performance] Improve QML Type Wrappers' JavaScript Engine Integration

    XMLWordPrintable

Details

    Description

      Summary:

      The current interface between QML and the V8 JavaScript engine has certain consequences for performance. This task is to research ways in which the interface can be modified in order to increase performance of symbol resolution and property access in QML.

      Current Technology:

      QML currently defines various (private implementation) wrapper classes which are used to generate v8 objects for use in QML/JS. Those v8 objects have accessors or interceptors installed, which are called by v8 when performing lookup. There are some optimizations in use currently (per-type constructor function cached per registered type, with fast accessors installed) however even these optimizations have a performance impact (lazy instantiation of the constructor function, cost of generating and installing accessors, etc).

      Possible Solutions:

      There are several possibilities which need to be explored as part of this task. The first possibility is to increase our integration with the v8 engine by ensuring that we utilise a new constructor function for every type (to ensure that v8 generates a new map per type), and then adding QML hint objects to the v8 per-map PIC. The second possibility is to rewrite v8's caching mechanism so that it caches code per-codesite rather than per-map (which would be far more difficult, but allow further optimisation of inlined code).

      Currently Identified Tasks:

      a) Determining how much optimisation can be achieved with the simpler integration method.
      b) Defining an invalidation strategy for cache entries which isn't subject to churn but ensures correctness.
      c) Writing comprehensive benchmarks to provide feedback on iterations of prototype solutions implemented for (a) and (b).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            chriadam Christopher Adams (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 12 weeks
                12w
                Remaining:
                Remaining Estimate - 12 weeks
                12w
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  There are no open Gerrit changes