aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2014-12-18 12:43:18 +0100
committerRobin Burchell <robin.burchell@viroteck.net>2014-12-31 05:07:08 +0100
commit132cdfa69cae45d0c02ea715ce58722bbcd57e73 (patch)
tree7e971a8c22f2ccc4172290e97093be376cffa27a /src/qml/jsruntime/qv4internalclass.cpp
parentefc3cc717ac1a62965465e909cc99acef627cdb1 (diff)
QV4::InternalClass: reserve space for transitions.
Profiling of allocations shows that this is one of the most frequent allocators. Change-Id: Iae0350c61bfe37381577642b9a93064377f45c1d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass.cpp')
-rw-r--r--src/qml/jsruntime/qv4internalclass.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp
index 0f88dd4d5a..c226ceade9 100644
--- a/src/qml/jsruntime/qv4internalclass.cpp
+++ b/src/qml/jsruntime/qv4internalclass.cpp
@@ -125,6 +125,7 @@ InternalClass::InternalClass(ExecutionEngine *engine)
, m_frozen(0)
, size(0)
{
+ transitions.reserve(17);
}
@@ -140,6 +141,7 @@ InternalClass::InternalClass(const QV4::InternalClass &other)
, m_frozen(0)
, size(other.size)
{
+ transitions.reserve(17);
}
void InternalClass::changeMember(Object *object, String *string, PropertyAttributes data, uint *index)