diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-13 18:15:43 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-08-24 19:24:25 +0000 |
commit | ce5c468f36286e251d3dfee3496faf240dc0e92d (patch) | |
tree | 619dfae870b05672b58b8a4be86801fa78fe61b9 /src/qml/jsruntime/qv4profiling_p.h | |
parent | 6d5caee804ca80eb81c364624847f70e62caa92e (diff) |
std::sort JS profiling data instead of insert-sorting it
The original FunctionCall struct is much smaller than the resulting
FunctionCallProperties, and thus not as expensive to copy. Repeatedly
calling upper_bound on a QVector is not such a great idea, either.
Since the usage of QVector instead of QList for the results is new
in Qt 5.6, the insert-sorting got slower, making this change a fix
for a performance regression.
Change-Id: I7154d8cf129b7fbe6e02424fbe16442042a5c3c2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4profiling_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4profiling_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h index cc00af0193..505d393a3d 100644 --- a/src/qml/jsruntime/qv4profiling_p.h +++ b/src/qml/jsruntime/qv4profiling_p.h @@ -104,6 +104,7 @@ public: FunctionCallProperties resolve() const; private: + friend bool operator<(const FunctionCall &call1, const FunctionCall &call2); Function *m_function; qint64 m_start; |