-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
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.
- relates to
-
QTBUG-113033 texteditor example becomes unusably slow with big texts
-
- Reported
-
-
QTBUG-93668 Material style controls cost excessive memory
-
- Open
-
-
QTBUG-62522 Loading QML files in 5.9 causes much higher memory consumption than in 5.6
-
- Closed
-
-
QTBUG-72525 Create a heavy QML application for benchmarking real-world full stack performance
-
- Closed
-
-
QTBUG-131022 Performance counter UI component
-
- Withdrawn
-