diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2014-12-03 15:58:41 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2014-12-09 18:54:12 +0100 |
commit | 8d553fdf952b79dc79447392161f97ff866cfcb9 (patch) | |
tree | de8d846581ac77de904fdbfb8f63a0dd9679a8e0 /src/render/io/qmeshdata_p.h | |
parent | 4469b3185602ee494fc8cdcae37c29dd8f1b7574 (diff) |
Optimize: Remove temporary allocations in QMeshData::attributeNames.
This is called frequently and was previously triggering many temporary
data allocations. By using a separated QStringList and QVector, we
can keep the behavior of the QHash and can remove the temporaries.
Change-Id: Idd7db916341037e98b78730d4f599990041ec706
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/io/qmeshdata_p.h')
-rw-r--r-- | src/render/io/qmeshdata_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/io/qmeshdata_p.h b/src/render/io/qmeshdata_p.h index 4774d5915..6e74b2370 100644 --- a/src/render/io/qmeshdata_p.h +++ b/src/render/io/qmeshdata_p.h @@ -66,7 +66,8 @@ public: Q_DECLARE_PUBLIC(QMeshData) QMeshData *q_ptr; - QMap<QString, QAbstractAttributePtr> m_attributes; + QStringList m_attributesNames; + QVector<QAbstractAttributePtr> m_attributes; QAbstractAttributePtr m_indexAttr; QAxisAlignedBoundingBox m_bbox; int m_verticesPerPatch; |