[Interest] Material controls memory usage

nus1998 nus1998 at yeah.net
Tue May 11 12:37:14 CEST 2021


Hello,


I used the delta value by subtraction, as there is a base memory usage cost by qtcore/qtgui/QWindow...

so the ratio should be (material usage - base) / (normal usage - base), the memory usage increases almost LINERLY
And, when the count is very big, the memory usage of material style is close to 1MB * button count



here is a simple code (by comment/uncomment "Style=Material" in qtquickcontrols2.conf)

importQtQuick2.15
importQtQuick.Controls2.15


ApplicationWindow{
width:640
height:480
visible:true
title:qsTr("Tabs")


Repeater{
model:900
Button{
x:index*10
y:10
width:100
height:100
}
}
}



At 2021-05-11 17:57:42, "Andrei Golubev" <andrei.golubev at qt.io> wrote:

Hello,


I don't understand how you got the 70 times difference (how is average per 200 buttons computed? and why 200?)
According to the data:


| button count
| normal (MB)
| material (MB)
| ratio*:
material / normal
|
| 100
| 24.2
| 130
| 5.37
|
| 300
| 27.7
| 343
| 12.38
|
| 500
| 30.9
| 555
| 17.96
|


*rounded values



The trend doesn't look good though. Why would the material style memory usage increase nonlinearly? I'd expect roughly constant ratio regardless of the button count.



--

Best Regards,
Andrei

From: Interest <interest-bounces at qt-project.org> on behalf of Mitch Curtis <mitch.curtis at qt.io>
Sent: Tuesday, May 11, 2021 11:09 AM
To: nus1998 <nus1998 at yeah.net>; interest at qt-project.org <interest at qt-project.org>
Subject: Re: [Interest] Material controls memory usage
 
Hi.

> -----Original Message-----
> From: Interest <interest-bounces at qt-project.org> On Behalf Of nus1998
> Sent: Tuesday, 11 May 2021 3:11 AM
> To: interest at qt-project.org
> Subject: [Interest] Material controls memory usage
>
> Hi All,
>
> I made a simple comparison that it looks material controls cost  70 times
> memory as normal quick controls, is it expected?

It's expected that it's more memory-intensive than most styles, but 70 times sounds a bit excessive. Can you please report this at bugreports.qt.io?

Cheers.

> my OS is win10 x64, with Qt 5.15.2 mingw64, here are the results:
>
> button count
> normal button memory usage(MB)
> material button memory usage (MB)
> 100
>
> 24.2
>
> 130
>
> 300
>
> 27.7
>
> 343
>
> 500
>
> 30.9
>
> 555
>
> avg. per 200 buttons:
> 3.35
>
> 212.5
>
>
>
>
>
>

_______________________________________________
Interest mailing list
Interest at qt-project.org
https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210511/3c046d62/attachment.html>


More information about the Interest mailing list