diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-03-02 16:26:36 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-03-11 09:18:54 +0000 |
commit | d87572053a15474a577dcf5714187fbdb4cfec0d (patch) | |
tree | 7bfdaa1bc40d2c201881db44b0d9a68888f4f52c /src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp | |
parent | c44413067da24f5d768f3fde25248cdba5a566bd (diff) |
QmlProfiler: Send events in smaller batches
This enables more parallel data processing and limits the memory
usage. Benchmarks with the "planets" example from canvas3d show that
this change reduces the time between the profiling being stopped and
the last events arriving in the profiling client by about 50%.
Change-Id: Iea16f9e2ae3adf584ec4a3c7fc766eaa21740f98
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp index e89d87e76b..872dcbe718 100644 --- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp +++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp @@ -107,7 +107,7 @@ static void qQmlProfilerDataToByteArrays(const QQmlProfilerData *d, QList<QByteA qint64 QQmlProfilerAdapter::sendMessages(qint64 until, QList<QByteArray> &messages) { while (next != data.length()) { - if (data[next].time > until) + if (data[next].time > until || messages.length() > s_numMessagesPerBatch) return data[next].time; qQmlProfilerDataToByteArrays(&(data[next++]), messages); } |