Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-7398

add memory benchmarks to qmlbench

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • QMLBench
    • None

      There have been occasional bug reports about the memory cost of certain things in Qt Quick (see linked bugs).  And now, developers in the Design Studio / Ignite project would like to be able to predict the cost of a particular UI design on a particular piece of hardware.  So it seems to me that we need to first build a table that records the memory cost of each Qt Quick item type, and each control in Qt Quick Controls, for each supported style, on each supported hardware target (or at least compare 32-bit arm, 64-bit arm, amd64 and so on).  But this is hard to measure!  sizeof() does not tell the whole story: there are a lot of dynamic allocations beyond the initial type that you instantiate by declaring it in QML.

      From some googling, it seems that maybe massif would be the tool to use for that.  So I should give it a try one of these days and see if it's possible to get a summary like that.  E.g. if I create one extra Button in Material style, how much does it cost.  It's easy to see the total memory usage of a process, but when I create one more Button it might not necessarily need to ask the OS to enlarge the heap, because it was probably already big enough and had some slack space.  Well, in C++, custom allocators are possible... that's another idea, but maybe the custom allocator would only be used for specific base-class types (such as QObject), so maybe it would miss some allocations of other types.  And it would be interesting to classify how much we use for the Qt Quick instances, and the corresponding scene graph nodes.

      If we can figure out how to measure that, then we can add it as a benchmark to track, to make sure we are not making it worse over time, and also to generate this table for Design Studio / Ignite to use.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jujokini Jukka Jokiniva
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes