std::sort JS profiling data instead of insert-sorting it
authorUlf Hermann <ulf.hermann@theqtcompany.com>
Thu, 13 Aug 2015 16:15:43 +0000 (18:15 +0200)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Mon, 24 Aug 2015 19:24:25 +0000 (19:24 +0000)
commitce5c468f36286e251d3dfee3496faf240dc0e92d
tree619dfae870b05672b58b8a4be86801fa78fe61b9
parent6d5caee804ca80eb81c364624847f70e62caa92e
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>
src/qml/jsruntime/qv4profiling.cpp
src/qml/jsruntime/qv4profiling_p.h