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

Increasing memory when using multiple QQuickViews with multiple QQMLEngines

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • 9926a4a49e8211a996667b467fd98b915e9f9d34 (qt/qtdeclarative/5.12)

    Description

      Our test example show a massive increase on used RAM when it's being executed in an overnight test (8h).

      Test description (TestRamMin.zip):

      • Simple test program creates one main window and one component window, using the same QML file containing a QTQuick-TextItem.
      • Both initialized with their own QQmlEngine and their own QML-Context. The windows show the current value of an QTimer measuring the program execution time. As shown in test_program.png.

       

      What we observed is, that if the two windows share the same QQmlEngine the memory consumption keeps nearly the same over a time-span of 8 hours, see memory_ok.png.

      But, if the windows do not share the QQMLEngine, additionally memory is consumed overtime. Doubling in somehow regular lapses within the 8 hours test-frame, as shown in memory_increasing.png.

      ~40min, ~80min, ~150min, ~300min

       

      Notes:

      • Trace/Usage graph was created with heaptrack and heaptrack_gui
      • Output shows that memory is mainly consumed by an instance of QArrayData
      • If the second window (Display) is closed the memory is freed, which  means we are not dealing with an actual leak but with an over-consumption.

       

      Attachments

        1. memory_increasing.png
          memory_increasing.png
          310 kB
        2. memory_ok.png
          memory_ok.png
          459 kB
        3. test_program.png
          test_program.png
          25 kB
        4. TestRamMin.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            gnux_dewetron Georg Neubauer
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes