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. QT4.8.4 : QtQuick 1.1 : images ressource management
Forum Updated to NodeBB v4.3 + New Features

QT4.8.4 : QtQuick 1.1 : images ressource management

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.1k 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.
  • S Offline
    S Offline
    Sil20
    wrote on last edited by
    #1

    Hello,
    I am devlopping a QML application.
    I would like to know if there is a difference between :

    • 2 instances loading and rendering the same image file
    • 2instances loading and rendering 2 duplicated files

    in other words:
    if img2.svg is a copy of img1.svg, are the 2 following code equivalent in term of performances and ressource consumption:

    @Image {
    id:iImg1
    source: "Images/img1.svg"
    }
    Image {
    id:iImg2
    source: "Images/img2.svg"
    }
    @
    and
    @Image {
    id:iImg1
    source: "Images/img1.svg"
    }
    Image {
    id:iImg2
    source: "Images/img1.svg"
    }
    @

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I think the second option (both Images loading img1.svg) will use less memory because of internal engine optimizations, but you would need to check that yourself to be sure.

      (Z(:^

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sil20
        wrote on last edited by
        #3

        OK, I just tested, and YES it is slower and memory consuming to load 2 duplicated images.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Nice, so now we know for sure :-)

          (Z(:^

          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