[Development] QVariant performance
sean.harmer at kdab.com
Mon May 16 19:06:27 CEST 2016
On Monday 16 May 2016 08:22:26 Thiago Macieira wrote:
> On segunda-feira, 16 de maio de 2016 11:52:57 PDT Sean Harmer wrote:
> > We have a WIP to replace the use of QVariant on the backend of Qt 3D but
> > it
> > would benefit all of Qt (including Qt 3D frontend to backend change
> > notifications) if we can also improve the locking behaviour of QVariant.
> > We
> > have some ideas here to either use thread local storage in addition to the
> > global metatype information registry and/or to use a scheme involving
> > atomic compare/exchange when updating metatype registration info.
> Uncontended locks in Qt are extremely cheap.
They're better now than they were since Olivier rewrote QReadWriteLock
Probably the biggest hit we see from the use of QVariant in Qt 3D these days
is the memory allocations for passing around QMatrix4x4's in them. We will
soon replace these with a strongly typed alternative.
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. UK +44 (0)1625 809908, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
More information about the Development