De-inline QQmlPrivate::revisionClassInfos()
It was compiled 1152 times, with the QList::push_back alone contributing a cumulative ~24sec to a 'ninja qtdeclarative'. There's no reason it should be inline, so make it out-of-line. This function was the highest non-QMetaType/non-std contributor in a Clang -ftime-trace build of qtdeclarative. Pick-to: 6.5 Task-number: QTBUG-97601 Change-Id: I143639168f859dc604b902647fe921332bbe49c0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
04a155dba4
commit
1e852bb496
|
@ -712,6 +712,19 @@ void QQmlPrivate::qmlunregister(RegistrationType type, quintptr data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QTypeRevision> QQmlPrivate::revisionClassInfos(const QMetaObject *metaObject,
|
||||||
|
const char *key)
|
||||||
|
{
|
||||||
|
QList<QTypeRevision> revisions;
|
||||||
|
for (int index = indexOfOwnClassInfo(metaObject, key); index != -1;
|
||||||
|
index = indexOfOwnClassInfo(metaObject, key, index - 1)) {
|
||||||
|
revisions.push_back(QTypeRevision::fromEncodedVersion(
|
||||||
|
QByteArray(metaObject->classInfo(index).value()).toInt()));
|
||||||
|
}
|
||||||
|
return revisions;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace QQmlPrivate {
|
namespace QQmlPrivate {
|
||||||
template<>
|
template<>
|
||||||
void qmlRegisterTypeAndRevisions<QQmlTypeNotAvailable, void>(
|
void qmlRegisterTypeAndRevisions<QQmlTypeNotAvailable, void>(
|
||||||
|
|
|
@ -799,16 +799,7 @@ namespace QQmlPrivate
|
||||||
QByteArray(metaObject->classInfo(index).value()).toInt());
|
QByteArray(metaObject->classInfo(index).value()).toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QList<QTypeRevision> revisionClassInfos(const QMetaObject *metaObject, const char *key)
|
Q_QML_EXPORT QList<QTypeRevision> revisionClassInfos(const QMetaObject *metaObject, const char *key);
|
||||||
{
|
|
||||||
QList<QTypeRevision> revisions;
|
|
||||||
for (int index = indexOfOwnClassInfo(metaObject, key); index != -1;
|
|
||||||
index = indexOfOwnClassInfo(metaObject, key, index - 1)) {
|
|
||||||
revisions.push_back(QTypeRevision::fromEncodedVersion(
|
|
||||||
QByteArray(metaObject->classInfo(index).value()).toInt()));
|
|
||||||
}
|
|
||||||
return revisions;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool boolClassInfo(const QMetaObject *metaObject, const char *key,
|
inline bool boolClassInfo(const QMetaObject *metaObject, const char *key,
|
||||||
bool defaultValue = false)
|
bool defaultValue = false)
|
||||||
|
|
Loading…
Reference in New Issue