Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML pages compilation issue
Forum Updated to NodeBB v4.3 + New Features

QML pages compilation issue

Scheduled Pinned Locked Moved QML and Qt Quick
9 Posts 4 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aabc
    wrote on last edited by
    #1

    Is there a way to compile the QML pages on demand (before I run them) ?

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      QML is an interpreted language; it's not compiled.

      Why do you ask?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aabc
        wrote on last edited by
        #3

        I disagree.
        Please take a look at the QML profiler (Qt Creator -> Analyze)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          JKSH is right, it's not compiled see for example "here":http://qt-project.org/doc/qt-4.8/qdeclarativeintroduction.html

          QML is JavaScript based

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            aabc
            wrote on last edited by
            #5

            So can you please explain me what does the compilation segment on the QML profiler mean ?

            1 Reply Last reply
            0
            • JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              [quote author="aabc" date="1395039338"]So can you please explain me what does the compilation segment on the QML profiler mean ?[/quote]That's a JavaScript JIT compiler, which is different from a static compiler: http://stackoverflow.com/questions/95635/what-does-a-just-in-time-jit-compiler-do

              Lots of people are asking for a static compiler for QML, but that feature looks like it won't be ready for a long time yet (assuming that it will arrive): http://stackoverflow.com/questions/17070135/qml-pre-compilation-to-bytecode-is-it-possible

              AFAIK, there is no way to manually invoke the JIT compiler. In any case, I'm not sure if there there are any benefits to letting developers control the JIT compiler.

              What are your plans?

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aabc
                wrote on last edited by
                #7

                I want to reduce the QML pages loading time.
                I have some QML pages who takes 200ms to compile .

                1 Reply Last reply
                0
                • O Offline
                  O Offline
                  onek24
                  wrote on last edited by
                  #8

                  [quote author="aabc" date="1395067289"]I want to reduce the QML pages loading time.
                  I have some QML pages who takes 200ms to compile .[/quote]

                  This documentation might help you: "Performance Considerations And Suggestions":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-performance.html

                  1 Reply Last reply
                  0
                  • JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #9

                    [quote author="JKSH" date="1395066257"][quote author="aabc" date="1395039338"]So can you please explain me what does the compilation segment on the QML profiler mean ?[/quote]That's a JavaScript JIT compiler[/quote]Sorry, I wasn't quite correct. This post explains QML "compilation": https://www.kdab.com/qml-engine-internals-part-1-qml-file-loading/ Basically, it parses a QML file and stores optimized data in RAM, to make it faster to generate C++ objects.

                    [quote author="aabc" date="1395067289"]I want to reduce the QML pages loading time.
                    I have some QML pages who takes 200ms to compile .[/quote]You can defer loading by using a "Loader":http://qt-project.org/doc/qt-5/qml-qtquick-loader.html, or load a component asynchronously by using "Component.incubateObject()":http://qt-project.org/doc/qt-5/qml-qtqml-component.html#incubateObject-method

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved