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/qv4profileradapter.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/qv4profileradapter.cpp')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp index ffacc58817..e91f7fbf51 100644 --- a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp +++ b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.cpp @@ -105,7 +105,7 @@ qint64 QV4ProfilerAdapter::sendMessages(qint64 until, QList<QByteArray> &message while (!m_stack.isEmpty() && (m_functionCallPos == m_functionCallData.length() || m_stack.top() <= m_functionCallData[m_functionCallPos].start)) { - if (m_stack.top() > until) + if (m_stack.top() > until || messages.length() > s_numMessagesPerBatch) return finalizeMessages(until, messages, m_stack.top()); appendMemoryEvents(m_stack.top(), messages); @@ -117,7 +117,7 @@ qint64 QV4ProfilerAdapter::sendMessages(qint64 until, QList<QByteArray> &message (m_stack.empty() || m_functionCallData[m_functionCallPos].start < m_stack.top())) { const QV4::Profiling::FunctionCallProperties &props = m_functionCallData[m_functionCallPos]; - if (props.start > until) + if (props.start > until || messages.length() > s_numMessagesPerBatch) return finalizeMessages(until, messages, props.start); appendMemoryEvents(props.start, messages); |