> 16 мая 2019 г., в 18:29, Thiago Macieira <thiago.macie...@intel.com> 
> написал(а):
> 
> When you first design the class, sure. But 5 years later, you may have the 
> data internally kept in a QMap or QHash, mapped to some other information. So 
> your function that used to "return d->member;" now does 
> "return d->member.keys();»

And now trivial getter allocates and has an O(N) complexity.

> 
> Another case would be where you're keeping extra data in the internal 
> structure and you need to filter that out before returning. 

And now trivial getter allocates and has an O(N) complexity.

Please, don’t do changes like that. It’s really not cool to find *interesting* 
things in a profiler after the Qt upgrade.
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to