[Development] Qt6 source changes

Nikolai Kosjar Nikolai.Kosjar at qt.io
Fri Nov 2 10:16:44 CET 2018


On 11/2/18 10:10 AM, André Pönitz wrote:
> On Fri, Nov 02, 2018 at 08:20:39AM +0000, Ulf Hermann wrote:
>>> Depends on usage.
>>>
>>> See e.g. 551efd91990e07902e5324f720cf5585865c323d
>>>
>>>      QmlProfiler: Use QList for QmlRange container when loading .qtd
>>>       
>>>      As we are using this as a queue, with many calls to takeFirst(), a
>>>      QVector is prohibitively expensive here.
>>
>> I should have used QQueue there, and that will hopefully still be a
>> linked(-ish) list in Qt6. Or it might become a ring buffer, but please
>> not a plain vector.
>>
>> If we don't want to keep QQueue, I will still have the option to use an
>> equivalent std container there (+/- implicit sharing).
> 
> I am not saying that QVector or QList is the best container here,
> it was just an example for a (rare...) case where a substitution
> introduces a significant performance regression in real life.
> 
> One concern here is also that the kind of regression can be hard to
> discover as compilation succeeds, systematic performance testing
> is often not done, and any manual testing before release usually
> uses only smaller-than-normal sample sizes. So the first one to
> notice the problem is the user of the code.

Introducing some new clazy checks specifically for catching issues for 
the Qt5->Qt6 port could help here.

Of course, the developer still would need to actually run clazy...

Nikolai


More information about the Development mailing list