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. Styling Loading Via XML
Forum Updated to NodeBB v4.3 + New Features

Styling Loading Via XML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 3 Posters 942 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.
  • M Offline
    M Offline
    Madesh R
    wrote on last edited by
    #1

    Hi All,

    I have list of styling files in XML format . In my current application , I'm loading all of the available XML files onto models. Then , whenever required just calling the model. Is it a better practice to do?
    or should I load xml files onto models only when it is required ?
    which one will be the most efficient way considering the performance.
    By the way ,The application is real time ,and needs to update display elements / styling as quickly as possible

    Thanks

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Either way it works. No issues. However if you need real time performance and not worried about memory you should load everything, parse and keep it ready.
      If memory is also constraint, you should load whenever required. For this you need to load, parse and make the things ready. You may hit slight performance issue. If performance is ok you can do like this.

      It is trade-off with memory and responsiveness.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      M 1 Reply Last reply
      2
      • dheerendraD dheerendra

        Either way it works. No issues. However if you need real time performance and not worried about memory you should load everything, parse and keep it ready.
        If memory is also constraint, you should load whenever required. For this you need to load, parse and make the things ready. You may hit slight performance issue. If performance is ok you can do like this.

        It is trade-off with memory and responsiveness.

        M Offline
        M Offline
        Madesh R
        wrote on last edited by
        #3

        @dheerendra

        Thank you so much for replying, Dheerendra Sir.
        I have one more question.

        When should I use Visibility , and when should I use Loaders. AS I know , Visibility is used to manipulate one or few Items. Where as loaders are used for large number of items to manipulate. However , this takes time to load . Bit worried about the performance here.
        If objects are created in prior (by setting visibility to false), will it have impact on performance?
        If I create objects dynamically , will the performance reduce? Which method will suit the most.

        Thank you

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          How many objects you need to work with ? Do you have too many ?

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          M 1 Reply Last reply
          1
          • dheerendraD dheerendra

            How many objects you need to work with ? Do you have too many ?

            M Offline
            M Offline
            Madesh R
            wrote on last edited by
            #5

            @dheerendra
            Hi Sir , I will be having around 6-7 objects to work with at a time

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #6

              Just check by keeping all the objects in memory. If it causes any memory issue, then you have load the qml dynamically.

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              1 Reply Last reply
              2
              • M Offline
                M Offline
                Maheshdev305
                wrote on last edited by
                #7

                I would suggest you to go for Json instead of XML, as it is simpler and less resource & memory intensive compared to XML.

                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