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. Do directory import statements affect perfomance in QML?
Forum Updated to NodeBB v4.3 + New Features

Do directory import statements affect perfomance in QML?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qt5qmlqtquick
3 Posts 2 Posters 914 Views
  • 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.
  • D Offline
    D Offline
    daljit97
    wrote on last edited by
    #1

    When I import a folder in a QML file that contains several other QML documents, does that affect the performancy of the application?
    I have included a small example of code to show what I mean.

    import QtQuick 2.2
    import QtQuick.Controls 2.0
    
    // the "Components" folder contains several QML documents, but not all of them will be used in this QML file
    // Does including unnecessary files affects perfomance?
    import "Components" 
    
    ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
        
        Text{
            anchors.centerIn: parent
            text: "This is a QML application"
        }
    }
    
    raven-worxR 1 Reply Last reply
    0
    • D daljit97

      When I import a folder in a QML file that contains several other QML documents, does that affect the performancy of the application?
      I have included a small example of code to show what I mean.

      import QtQuick 2.2
      import QtQuick.Controls 2.0
      
      // the "Components" folder contains several QML documents, but not all of them will be used in this QML file
      // Does including unnecessary files affects perfomance?
      import "Components" 
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
          
          Text{
              anchors.centerIn: parent
              text: "This is a QML application"
          }
      }
      
      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @daljit97
      everything which uses system resources impacts the performance...
      Filesystem access is mostly the bottleneck.
      About how many QML files are qml talking here? And whats their size?
      Also take into account that these qml files also have imports.

      So if application is performance critical you should do the effort and separate/categorize them into subfolders at least.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • D Offline
        D Offline
        daljit97
        wrote on last edited by
        #3

        Well in this case I have about 20 qml files.

        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